Skip to content

Commit 6102cd9

Browse files
authored
Fix MSTEST0001 documentation about suppressing (#44974)
1 parent 2367806 commit 6102cd9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/core/testing/mstest-analyzers/mstest0001.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,15 @@ Do not suppress a warning from this rule. Many libraries can benefit from a mass
4747

4848
## Suppress a warning
4949

50-
Violations to this rule cannot be suppressed inline.
50+
Because this rule is reported at the compilation level and not in a *.cs* or *.vb* source file, you can't suppress violations to this rule inline or via an `.editorconfig` file.
5151

52-
To disable the rule for a file, folder, or project, set its severity to `none` in the [configuration file](../../../fundamentals/code-analysis/configuration-files.md).
52+
To disable the rule for a project, add `<NoWarn>$(NoWarn);MSTEST0001</NoWarn>` to the project file or `Directory.Build.props` file.
53+
54+
To control the severity of this rule, you can do it only via a `.globalconfig` file. For more information, see [Configuration files](../../../fundamentals/code-analysis/configuration-files.md#global-analyzerconfig).
5355

5456
```ini
55-
[*.{cs,vb}]
57+
is_global = true
58+
5659
dotnet_diagnostic.MSTEST0001.severity = none
5760
```
5861

0 commit comments

Comments
 (0)