diff --git a/docs/core/testing/mstest-analyzers/mstest0001.md b/docs/core/testing/mstest-analyzers/mstest0001.md index 54df7eb6b1f8d..13622dd37ce9f 100644 --- a/docs/core/testing/mstest-analyzers/mstest0001.md +++ b/docs/core/testing/mstest-analyzers/mstest0001.md @@ -47,12 +47,15 @@ Do not suppress a warning from this rule. Many libraries can benefit from a mass ## Suppress a warning -Violations to this rule cannot be suppressed inline. +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. -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). +To disable the rule for a project, add `$(NoWarn);MSTEST0001` to the project file or `Directory.Build.props` file. + +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). ```ini -[*.{cs,vb}] +is_global = true + dotnet_diagnostic.MSTEST0001.severity = none ```