From 6a286e4fd276eeb470414ccfe10f7dc9ee84b0d9 Mon Sep 17 00:00:00 2001 From: Justin-Nietzel Date: Wed, 22 Jul 2026 16:07:36 -0400 Subject: [PATCH 1/2] Clarify behavior for suppressing warnings against inner namespaces. Suppressing warnings against a namespace does not suppress warnings against inner namespaces, i.e. namespaces that share all namespace segments with suppressed namespace. --- .../SuppressMessageAttribute.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Diagnostics.CodeAnalysis/SuppressMessageAttribute.xml b/xml/System.Diagnostics.CodeAnalysis/SuppressMessageAttribute.xml index c5a65953607..67f6d3cd0ab 100644 --- a/xml/System.Diagnostics.CodeAnalysis/SuppressMessageAttribute.xml +++ b/xml/System.Diagnostics.CodeAnalysis/SuppressMessageAttribute.xml @@ -421,7 +421,7 @@ The proper | - | - | | `"member"` | Suppresses warnings against a member. | | `"module"` | Suppresses warnings against an assembly. It is a global suppression that applies to the entire project. | -| `"namespace"` | This scope suppresses warnings against the namespace itself. It does not suppress warnings against types within the namespace. | +| `"namespace"` | This scope suppresses warnings against the namespace itself. It does not suppress warnings against types within the namespace nor inner namespaces. | | `"namespaceanddescendants"` | Suppresses warnings in a namespace and all its descendant symbols. This value is ignored by [legacy code analysis](/visualstudio/code-quality/static-code-analysis-for-managed-code-overview). | | `"type"` | Suppresses warnings against a type. | From e4e95404d0e65e205255f5d99b088d225ed1cd8b Mon Sep 17 00:00:00 2001 From: Justin-Nietzel Date: Thu, 23 Jul 2026 10:54:04 -0400 Subject: [PATCH 2/2] Change 'nor' to 'or'. Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- .../SuppressMessageAttribute.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Diagnostics.CodeAnalysis/SuppressMessageAttribute.xml b/xml/System.Diagnostics.CodeAnalysis/SuppressMessageAttribute.xml index 67f6d3cd0ab..9a4ded6d1b9 100644 --- a/xml/System.Diagnostics.CodeAnalysis/SuppressMessageAttribute.xml +++ b/xml/System.Diagnostics.CodeAnalysis/SuppressMessageAttribute.xml @@ -421,7 +421,7 @@ The proper | - | - | | `"member"` | Suppresses warnings against a member. | | `"module"` | Suppresses warnings against an assembly. It is a global suppression that applies to the entire project. | -| `"namespace"` | This scope suppresses warnings against the namespace itself. It does not suppress warnings against types within the namespace nor inner namespaces. | +| `"namespace"` | This scope suppresses warnings against the namespace itself. It does not suppress warnings against types within the namespace or inner namespaces. | | `"namespaceanddescendants"` | Suppresses warnings in a namespace and all its descendant symbols. This value is ignored by [legacy code analysis](/visualstudio/code-quality/static-code-analysis-for-managed-code-overview). | | `"type"` | Suppresses warnings against a type. |