File tree Expand file tree Collapse file tree 7 files changed +22
-10
lines changed
docs/core/testing/mstest-analyzers Expand file tree Collapse file tree 7 files changed +22
-10
lines changed Original file line number Diff line number Diff line change
1
+ > [ !NOTE]
2
+ > This rule is opt-in. It's not enabled even when using ` <MSTestAnalysisMode>All</MSTestAnalysisMode> ` . For more information about ` MSTestAnalysisMode ` , see [ MSTest code analysis] ( ../overview.md ) .
Original file line number Diff line number Diff line change @@ -16,16 +16,16 @@ dev_langs:
16
16
---
17
17
# MSTEST0003: Test methods should have valid layout
18
18
19
- | Property | Value |
20
- | -------------------------------------| ----------------------------------------------------|
21
- | ** Rule ID** | MSTEST0003 |
22
- | ** Title** | Test methods should have valid layout |
23
- | ** Category** | Usage |
24
- | ** Fix is breaking or non-breaking** | Breaking |
25
- | ** Enabled by default** | Yes |
26
- | ** Default severity** | Warning |
27
- | ** Introduced in version** | 3.2.0 |
28
- | ** Is there a code fix** | Yes |
19
+ | Property | Value |
20
+ | -------------------------------------| ------------------------------------------------------------------------------------------ |
21
+ | ** Rule ID** | MSTEST0003 |
22
+ | ** Title** | Test methods should have valid layout |
23
+ | ** Category** | Usage |
24
+ | ** Fix is breaking or non-breaking** | Breaking |
25
+ | ** Enabled by default** | Yes |
26
+ | ** Default severity** | Warning (escalated to Error when setting ` MSTestAnalysisMode ` to ` Recommended ` or ` All ` ) |
27
+ | ** Introduced in version** | 3.2.0 |
28
+ | ** Is there a code fix** | Yes |
29
29
30
30
## Cause
31
31
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ Ensure that the test method isn't ignored.
40
40
41
41
Do not suppress a warning from this rule. If you ignore this rule, test method will be ignored.
42
42
43
+ [ !INCLUDE [ disabled-in-all] ( includes/disabled-in-all.md )]
44
+
43
45
## Suppress a warning
44
46
45
47
If you just want to suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule.
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ Replace the constructor call with a `[TestInitialize]` method.
40
40
41
41
You usually don't want to suppress warnings from this rule if you decided to opt-in for it.
42
42
43
+ [ !INCLUDE [ disabled-in-all] ( includes/disabled-in-all.md )]
44
+
43
45
## Suppress a warning
44
46
45
47
If you just want to suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule.
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ Replace `[TestInitialize]` returning `void` by constructors.
40
40
41
41
You usually don't want to suppress warnings from this rule if you decided to opt-in for it.
42
42
43
+ [ !INCLUDE [ disabled-in-all] ( includes/disabled-in-all.md )]
44
+
43
45
## Suppress a warning
44
46
45
47
If you just want to suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule.
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ Replace `[TestCleanup]` method by `Dispose` or `DisposeAsync` pattern.
40
40
41
41
You usually don't want to suppress warnings from this rule if you decided to opt-in for it.
42
42
43
+ [ !INCLUDE [ disabled-in-all] ( includes/disabled-in-all.md )]
44
+
43
45
## Suppress a warning
44
46
45
47
If you just want to suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule.
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ Replace `Dispose` or `DisposeAsync` methods with `[TestCleanup]`.
40
40
41
41
You usually don't want to suppress warnings from this rule if you decided to opt-in for it.
42
42
43
+ [ !INCLUDE [ disabled-in-all] ( includes/disabled-in-all.md )]
44
+
43
45
## Suppress a warning
44
46
45
47
If you just want to suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule.
You can’t perform that action at this time.
0 commit comments