From ec7a4b7175b5743a12df798bd978bb243b8979b4 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 27 Oct 2021 09:39:06 -0400 Subject: [PATCH 1/2] Enable new analyzers in global configs --- eng/CodeAnalysis.src.globalconfig | 6 ++++++ eng/CodeAnalysis.test.globalconfig | 6 ++++++ .../src/System.Security.Cryptography.Xml.csproj | 1 + 3 files changed, 13 insertions(+) diff --git a/eng/CodeAnalysis.src.globalconfig b/eng/CodeAnalysis.src.globalconfig index 1f1ba7216dc06b..400c8c432c21bf 100644 --- a/eng/CodeAnalysis.src.globalconfig +++ b/eng/CodeAnalysis.src.globalconfig @@ -386,6 +386,12 @@ dotnet_diagnostic.CA1847.severity = warning # CA1848: Use the LoggerMessage delegates dotnet_diagnostic.CA1848.severity = none +# CA1849: Call async methods when in an async method +dotnet_diagnostic.CA1849.severity = suggestion + +# CA1850: Prefer static 'HashData' method over 'ComputeHash' +dotnet_diagnostic.CA1850.severity = warning + # CA2000: Dispose objects before losing scope dotnet_diagnostic.CA2000.severity = none diff --git a/eng/CodeAnalysis.test.globalconfig b/eng/CodeAnalysis.test.globalconfig index 5f31263bf86570..572310d3b86d0a 100644 --- a/eng/CodeAnalysis.test.globalconfig +++ b/eng/CodeAnalysis.test.globalconfig @@ -384,6 +384,12 @@ dotnet_diagnostic.CA1847.severity = none # CA1848: Use the LoggerMessage delegates dotnet_diagnostic.CA1848.severity = none +# CA1849: Call async methods when in an async method +dotnet_diagnostic.CA1849.severity = none + +# CA1850: Prefer static 'HashData' method over 'ComputeHash' +dotnet_diagnostic.CA1850.severity = none + # CA2000: Dispose objects before losing scope dotnet_diagnostic.CA2000.severity = none diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj index d44841c9b17743..5284ff9f698832 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj +++ b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj @@ -3,6 +3,7 @@ true $(NetCoreAppCurrent);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true + $(NoWarn);CA1850 Provides classes to support the creation and validation of XML digital signatures. The classes in this namespace implement the World Wide Web Consortium Recommendation, "XML-Signature Syntax and Processing", described at http://www.w3.org/TR/xmldsig-core/. Commonly Used Types: From a4c31fe1826756c88156d486df0545a574b75f96 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 11 Nov 2021 22:10:04 -0500 Subject: [PATCH 2/2] Address PR feedback --- .../src/System.Security.Cryptography.Xml.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj index 5284ff9f698832..5c8934d82cd7de 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj +++ b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj @@ -3,7 +3,7 @@ true $(NetCoreAppCurrent);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true - $(NoWarn);CA1850 + $(NoWarn);CA1850 Provides classes to support the creation and validation of XML digital signatures. The classes in this namespace implement the World Wide Web Consortium Recommendation, "XML-Signature Syntax and Processing", described at http://www.w3.org/TR/xmldsig-core/. Commonly Used Types: