From a3b186b9904844b8001d4bb5d7474f2591ee96d9 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Sun, 14 Nov 2021 07:07:47 -0500 Subject: [PATCH] Enable new analyzers in global configs (#60914) * Enable new analyzers in global configs * Address PR feedback --- 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..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,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: