From 54cb57399dabbfdcc1f7621b81c0420863a8f39c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:38:41 -0700 Subject: [PATCH] [main] Update dependencies from dotnet/roslyn-analyzers (#87768) * Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20230618.1 * Suppress RS1038 analyzer * Fix new failures found with CA1859 analyzer updates * Disable CA2261 on test projects, fix more CA1859 findings --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Buyaa Namnan --- eng/CodeAnalysis.src.globalconfig | 3 +++ eng/CodeAnalysis.test.globalconfig | 3 +++ eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- .../System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs | 2 ++ .../tools/Common/Compiler/GenericCycleDetection/Graph.Cycles.cs | 2 +- .../Compiler/DependencyAnalysis/VTableSliceNode.cs | 2 +- .../src/EventSourceLogger.cs | 2 +- src/libraries/System.Linq/src/System/Linq/Enumerable.SizeOpt.cs | 2 +- .../System/Xml/Serialization/ReflectionXmlSerializationReader.cs | 6 +++--- .../gen/JSImportGenerator/JSImportGenerator.csproj | 2 +- .../gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj | 2 +- .../gen/LibraryImportGenerator/LibraryImportGenerator.csproj | 2 +- .../Pal/Windows/DecryptorPalWindows.DecodeRecipients.cs | 2 ++ 14 files changed, 26 insertions(+), 16 deletions(-) diff --git a/eng/CodeAnalysis.src.globalconfig b/eng/CodeAnalysis.src.globalconfig index 0fdc741..f7b055d 100644 --- a/eng/CodeAnalysis.src.globalconfig +++ b/eng/CodeAnalysis.src.globalconfig @@ -658,6 +658,9 @@ dotnet_diagnostic.CA2259.severity = warning # CA2260: Use correct type parameter dotnet_diagnostic.CA2260.severity = warning +# CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task +dotnet_diagnostic.CA2261.severity = warning + # CA2300: Do not use insecure deserializer BinaryFormatter dotnet_diagnostic.CA2300.severity = none diff --git a/eng/CodeAnalysis.test.globalconfig b/eng/CodeAnalysis.test.globalconfig index ae1dc7e..fa3d259 100644 --- a/eng/CodeAnalysis.test.globalconfig +++ b/eng/CodeAnalysis.test.globalconfig @@ -654,6 +654,9 @@ dotnet_diagnostic.CA2259.severity = none # CA2260: Use correct type parameter dotnet_diagnostic.CA2260.severity = none +# CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task +dotnet_diagnostic.CA2261.severity = none + # CA2300: Do not use insecure deserializer BinaryFormatter dotnet_diagnostic.CA2300.severity = none diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0ca799c..5e032c4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -372,13 +372,13 @@ https://github.com/dotnet/roslyn 7787409c6b529c021d4f8b5fbe3d620094953be9 - + https://github.com/dotnet/roslyn-analyzers - 2f0301ef59624a72fb00f7fd92caa50be03f277d + 82603c16509d7383cd1922680773a79b839b1705 - + https://github.com/dotnet/roslyn-analyzers - 2f0301ef59624a72fb00f7fd92caa50be03f277d + 82603c16509d7383cd1922680773a79b839b1705 https://github.com/dotnet/sdk diff --git a/eng/Versions.props b/eng/Versions.props index 0217d8e..e9dba7b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -32,8 +32,8 @@ - 3.3.5-beta1.23308.2 - 8.0.0-preview.23308.2 + 3.11.0-beta1.23357.1 + 8.0.0-preview.23357.1 - RS2008;$(NoWarn) + RS2008;RS1038;$(NoWarn) $(DefineConstants);JSIMPORTGENERATOR cs diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj index a8fb656..a4251a4 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj @@ -8,7 +8,7 @@ true - RS2008;$(NoWarn) + RS2008;RS1038;$(NoWarn) cs $(DefineConstants);MICROSOFT_INTEROP_COMINTERFACEGENERATOR diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj index 621caea..bb29734 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj @@ -8,7 +8,7 @@ true - RS2008;$(NoWarn) + RS2008;RS1038;$(NoWarn) cs diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/DecryptorPalWindows.DecodeRecipients.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/DecryptorPalWindows.DecodeRecipients.cs index a9233e6..27a4848 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/DecryptorPalWindows.DecodeRecipients.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/DecryptorPalWindows.DecodeRecipients.cs @@ -33,7 +33,9 @@ namespace Internal.Cryptography.Pal.Windows return new RecipientInfoCollection(recipientInfos); } +#pragma warning disable CA1859 // Use concrete types when possible for improved performance https://github.com/dotnet/roslyn-analyzers/issues/6751 private static IEnumerable ToRecipientInfosForThisIndex(SafeHandle pCmsgCmsRecipientInfoMemory, int index) +#pragma warning restore CA1859 { bool mustRelease = false; pCmsgCmsRecipientInfoMemory.DangerousAddRef(ref mustRelease); -- 2.7.4