codekingpro commited on
Commit
6cb088e
·
verified ·
1 Parent(s): f7a88ba

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props +7 -0
  2. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.targets +61 -0
  3. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/buildMultiTargeting/Microsoft.Build.Tasks.Git.props +4 -0
  4. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/buildMultiTargeting/Microsoft.Build.Tasks.Git.targets +4 -0
  5. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/Microsoft.Build.Tasks.Git.dll +0 -0
  6. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/cs/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  7. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/de/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  8. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/es/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  9. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/fr/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  10. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/it/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  11. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/ja/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  12. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/ko/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  13. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/pl/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  14. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/pt-BR/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  15. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/ru/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  16. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/tr/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  17. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/Microsoft.Build.Tasks.Git.dll +0 -0
  18. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/cs/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  19. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/de/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  20. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/es/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  21. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/fr/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  22. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/it/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  23. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/ja/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  24. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/ko/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  25. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/pl/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  26. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/pt-BR/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  27. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/ru/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  28. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/tr/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  29. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/zh-Hans/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  30. dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/zh-Hant/Microsoft.Build.Tasks.Git.resources.dll +0 -0
  31. dotnet/sdk/9.0.313/Sdks/Microsoft.Docker.Sdk/Sdk/Sdk.props +44 -0
  32. dotnet/sdk/9.0.313/Sdks/Microsoft.Docker.Sdk/Sdk/Sdk.targets +31 -0
  33. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/Microsoft.CodeAnalysis.NetAnalyzers.props +25 -0
  34. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/Microsoft.CodeAnalysis.NetAnalyzers.targets +646 -0
  35. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_all.globalconfig +837 -0
  36. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_all_warnaserror.globalconfig +906 -0
  37. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_default.globalconfig +9 -0
  38. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_default_warnaserror.globalconfig +84 -0
  39. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_minimum.globalconfig +276 -0
  40. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_minimum_warnaserror.globalconfig +345 -0
  41. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_none.globalconfig +510 -0
  42. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_none_warnaserror.globalconfig +510 -0
  43. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_recommended.globalconfig +435 -0
  44. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_recommended_warnaserror.globalconfig +504 -0
  45. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_all.globalconfig +870 -0
  46. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_all_warnaserror.globalconfig +894 -0
  47. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_default.globalconfig +204 -0
  48. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_default_warnaserror.globalconfig +228 -0
  49. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_minimum.globalconfig +345 -0
  50. dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_minimum_warnaserror.globalconfig +369 -0
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
2
+ <Project>
3
+ <PropertyGroup>
4
+ <MicrosoftBuildTasksGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile>
5
+ <MicrosoftBuildTasksGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile>
6
+ </PropertyGroup>
7
+ </Project>
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.targets ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
2
+ <Project>
3
+ <UsingTask TaskName="Microsoft.Build.Tasks.Git.LocateRepository" AssemblyFile="$(MicrosoftBuildTasksGitAssemblyFile)"/>
4
+ <UsingTask TaskName="Microsoft.Build.Tasks.Git.GetUntrackedFiles" AssemblyFile="$(MicrosoftBuildTasksGitAssemblyFile)"/>
5
+
6
+ <PropertyGroup>
7
+ <!--
8
+ Sets the scope of git repository configuration. By default (no scope specified) configuration is read from environment variables
9
+ and system and global user git/ssh configuration files.
10
+
11
+ If "local" is specified the configuration is only read from the configuration files local to the repository (or work tree).
12
+ In addition, any use of home relative paths in these configuration files (paths that start with '~/') is disallowed.
13
+
14
+ By default, the scope is restricted to "local" when building in CI (ContinuousIntegrationBuild is true) to avoid introducing
15
+ dependencies on CI machine state into the build.
16
+ -->
17
+ <GitRepositoryConfigurationScope Condition="'$(GitRepositoryConfigurationScope)' == '' and '$(ContinuousIntegrationBuild)' == 'true'">local</GitRepositoryConfigurationScope>
18
+ </PropertyGroup>
19
+
20
+ <Target Name="InitializeSourceControlInformationFromSourceControlManager">
21
+ <!--
22
+ Reports a warning if the given project doesn't belong to a repository under source control,
23
+ unless the targets were implicily imported from an SDK without a package reference.
24
+ -->
25
+ <Microsoft.Build.Tasks.Git.LocateRepository
26
+ Path="$(MSBuildProjectDirectory)"
27
+ RemoteName="$(GitRepositoryRemoteName)"
28
+ ConfigurationScope="$(GitRepositoryConfigurationScope)"
29
+ NoWarnOnMissingInfo="$(PkgMicrosoft_Build_Tasks_Git.Equals(''))">
30
+
31
+ <Output TaskParameter="RepositoryId" PropertyName="_GitRepositoryId" />
32
+ <Output TaskParameter="Url" PropertyName="ScmRepositoryUrl" />
33
+ <Output TaskParameter="Roots" ItemName="SourceRoot" />
34
+ <Output TaskParameter="RevisionId" PropertyName="SourceRevisionId" Condition="'$(SourceRevisionId)' == ''" />
35
+ <Output TaskParameter="BranchName" PropertyName="SourceBranchName" />
36
+ </Microsoft.Build.Tasks.Git.LocateRepository>
37
+
38
+ <PropertyGroup>
39
+ <RepositoryType Condition="'$(RepositoryType)' == ''">git</RepositoryType>
40
+ </PropertyGroup>
41
+ </Target>
42
+
43
+ <!--
44
+ Embed files to the PDB that either do not belong to any of the SourceRoot directories
45
+ or belong to the source repository, but are explicitly ignored (excluded) from source control.
46
+ -->
47
+ <Target Name="SetEmbeddedFilesFromSourceControlManagerUntrackedFiles"
48
+ DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager">
49
+
50
+ <Microsoft.Build.Tasks.Git.GetUntrackedFiles
51
+ RepositoryId="$(_GitRepositoryId)"
52
+ ConfigurationScope="$(GitRepositoryConfigurationScope)"
53
+ ProjectDirectory="$(MSBuildProjectDirectory)"
54
+ Files="@(Compile)"
55
+ Condition="'$(_GitRepositoryId)' != ''">
56
+
57
+ <Output TaskParameter="UntrackedFiles" ItemName="EmbeddedFiles" />
58
+ </Microsoft.Build.Tasks.Git.GetUntrackedFiles>
59
+ </Target>
60
+
61
+ </Project>
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/buildMultiTargeting/Microsoft.Build.Tasks.Git.props ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ <!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
2
+ <Project>
3
+ <Import Project="..\build\$(MSBuildThisFileName).props"/>
4
+ </Project>
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/buildMultiTargeting/Microsoft.Build.Tasks.Git.targets ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ <!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
2
+ <Project>
3
+ <Import Project="..\build\$(MSBuildThisFileName).targets"/>
4
+ </Project>
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/Microsoft.Build.Tasks.Git.dll ADDED
Binary file (79.4 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/cs/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (18.5 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/de/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/es/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/fr/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/it/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/ja/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19.5 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/ko/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/pl/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/pt-BR/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/ru/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (20 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/core/tr/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (18.5 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/Microsoft.Build.Tasks.Git.dll ADDED
Binary file (83.5 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/cs/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (18.5 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/de/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/es/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/fr/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/it/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/ja/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19.5 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/ko/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/pl/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/pt-BR/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (19 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/ru/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (20 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/tr/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (18.5 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/zh-Hans/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (18.5 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Build.Tasks.Git/tools/net472/zh-Hant/Microsoft.Build.Tasks.Git.resources.dll ADDED
Binary file (18.5 kB). View file
 
dotnet/sdk/9.0.313/Sdks/Microsoft.Docker.Sdk/Sdk/Sdk.props ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <!--
4
+ ***********************************************************************************************
5
+ Sdk.props
6
+
7
+ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
8
+ created a backup copy. Incorrect changes to this file will make it
9
+ impossible to load or build your projects from the command-line or the IDE.
10
+
11
+ Copyright (c) Microsoft Corporation. All rights reserved.
12
+ Licensed under the MIT license.
13
+ ***********************************************************************************************
14
+ -->
15
+
16
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
17
+
18
+ <PropertyGroup>
19
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
20
+ </PropertyGroup>
21
+
22
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
23
+
24
+ <PropertyGroup>
25
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
26
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
27
+ <OutputPath Condition=" '$(OutputPath)' == '' ">bin\$(Configuration)\</OutputPath>
28
+ <OutputType>DockerCompose</OutputType>
29
+ <SkipCopyBuildProduct>true</SkipCopyBuildProduct>
30
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
31
+ <DebugSymbols>false</DebugSymbols>
32
+ <TargetRuntime>None</TargetRuntime>
33
+ </PropertyGroup>
34
+
35
+ <PropertyGroup>
36
+ <ResolveNuGetPackages>false</ResolveNuGetPackages>
37
+ <SkipImportNuGetProps>true</SkipImportNuGetProps>
38
+ <SkipImportNuGetBuildTargets>true</SkipImportNuGetBuildTargets>
39
+ </PropertyGroup>
40
+
41
+ <Import Project="$(MSBuildExtensionsPath)\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.props"
42
+ Condition="Exists('$(MSBuildExtensionsPath)\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.props')" />
43
+
44
+ </Project>
dotnet/sdk/9.0.313/Sdks/Microsoft.Docker.Sdk/Sdk/Sdk.targets ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <!--
4
+ ***********************************************************************************************
5
+ Sdk.targets
6
+
7
+ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
8
+ created a backup copy. Incorrect changes to this file will make it
9
+ impossible to load or build your projects from the command-line or the IDE.
10
+
11
+ Copyright (c) Microsoft Corporation. All rights reserved.
12
+ Licensed under the MIT license.
13
+ ***********************************************************************************************
14
+ -->
15
+
16
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
17
+
18
+ <PropertyGroup>
19
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
20
+ </PropertyGroup>
21
+
22
+ <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
23
+
24
+ <Target Name="CoreCompile" />
25
+
26
+ <Target Name="CreateManifestResourceNames" />
27
+
28
+ <Import Project="$(MSBuildExtensionsPath)\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets"
29
+ Condition="Exists('$(MSBuildExtensionsPath)\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets')"/>
30
+
31
+ </Project>
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/Microsoft.CodeAnalysis.NetAnalyzers.props ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <Project>
2
+
3
+ <!--
4
+ This import includes an additional props file that disables built-in analyzers from .NET SDK that have the identical CA rules to those implemented in this package.
5
+ This additional props file should only be present in the analyzer NuGet package, it should **not** be inserted into the .NET SDK.
6
+ -->
7
+ <Import Project="DisableNETAnalyzersForNuGetPackage.props" Condition="Exists('DisableNETAnalyzersForNuGetPackage.props')" />
8
+
9
+ <!--
10
+ PropertyGroup to set the NetAnalyzers version installed in the SDK.
11
+ We rely on the additional props file 'DisableNETAnalyzersForNuGetPackage.props' not being present in the SDK.
12
+ -->
13
+ <PropertyGroup Condition="!Exists('DisableNETAnalyzersForNuGetPackage.props')">
14
+ <_NETAnalyzersSDKAssemblyVersion>9.0.0</_NETAnalyzersSDKAssemblyVersion>
15
+ </PropertyGroup>
16
+
17
+ <!--
18
+ This property group handles 'CodeAnalysisTreatWarningsAsErrors = false' for the CA rule ids implemented in this package.
19
+ -->
20
+ <PropertyGroup>
21
+ <CodeAnalysisRuleIds>CA1000;CA1001;CA1002;CA1003;CA1005;CA1008;CA1010;CA1012;CA1014;CA1016;CA1017;CA1018;CA1019;CA1021;CA1024;CA1027;CA1028;CA1030;CA1031;CA1032;CA1033;CA1034;CA1036;CA1040;CA1041;CA1043;CA1044;CA1045;CA1046;CA1047;CA1050;CA1051;CA1052;CA1054;CA1055;CA1056;CA1058;CA1060;CA1061;CA1062;CA1063;CA1064;CA1065;CA1066;CA1067;CA1068;CA1069;CA1070;CA1200;CA1303;CA1304;CA1305;CA1307;CA1308;CA1309;CA1310;CA1311;CA1401;CA1416;CA1417;CA1418;CA1419;CA1420;CA1421;CA1422;CA1501;CA1502;CA1505;CA1506;CA1507;CA1508;CA1509;CA1510;CA1511;CA1512;CA1513;CA1514;CA1515;CA1700;CA1707;CA1708;CA1710;CA1711;CA1712;CA1713;CA1715;CA1716;CA1720;CA1721;CA1724;CA1725;CA1727;CA1802;CA1805;CA1806;CA1810;CA1812;CA1813;CA1814;CA1815;CA1816;CA1819;CA1820;CA1821;CA1822;CA1823;CA1824;CA1825;CA1826;CA1827;CA1828;CA1829;CA1830;CA1831;CA1832;CA1833;CA1834;CA1835;CA1836;CA1837;CA1838;CA1839;CA1840;CA1841;CA1842;CA1843;CA1844;CA1845;CA1846;CA1847;CA1848;CA1849;CA1850;CA1851;CA1852;CA1853;CA1854;CA1855;CA1856;CA1857;CA1858;CA1859;CA1860;CA1861;CA1862;CA1863;CA1864;CA1865;CA1866;CA1867;CA1868;CA1869;CA1870;CA1871;CA1872;CA2000;CA2002;CA2007;CA2008;CA2009;CA2011;CA2012;CA2013;CA2014;CA2015;CA2016;CA2017;CA2018;CA2019;CA2020;CA2021;CA2022;CA2100;CA2101;CA2119;CA2153;CA2200;CA2201;CA2207;CA2208;CA2211;CA2213;CA2214;CA2215;CA2216;CA2217;CA2218;CA2219;CA2224;CA2225;CA2226;CA2227;CA2231;CA2234;CA2235;CA2237;CA2241;CA2242;CA2243;CA2244;CA2245;CA2246;CA2247;CA2248;CA2249;CA2250;CA2251;CA2252;CA2253;CA2254;CA2255;CA2256;CA2257;CA2258;CA2259;CA2260;CA2261;CA2262;CA2263;CA2264;CA2265;CA2300;CA2301;CA2302;CA2305;CA2310;CA2311;CA2312;CA2315;CA2321;CA2322;CA2326;CA2327;CA2328;CA2329;CA2330;CA2350;CA2351;CA2352;CA2353;CA2354;CA2355;CA2356;CA2361;CA2362;CA3001;CA3002;CA3003;CA3004;CA3005;CA3006;CA3007;CA3008;CA3009;CA3010;CA3011;CA3012;CA3061;CA3075;CA3076;CA3077;CA3147;CA5350;CA5351;CA5358;CA5359;CA5360;CA5361;CA5362;CA5363;CA5364;CA5365;CA5366;CA5367;CA5368;CA5369;CA5370;CA5371;CA5372;CA5373;CA5374;CA5375;CA5376;CA5377;CA5378;CA5379;CA5380;CA5381;CA5382;CA5383;CA5384;CA5385;CA5386;CA5387;CA5388;CA5389;CA5390;CA5391;CA5392;CA5393;CA5394;CA5395;CA5396;CA5397;CA5398;CA5399;CA5400;CA5401;CA5402;CA5403;CA5404;CA5405</CodeAnalysisRuleIds>
22
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
23
+ <WarningsNotAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'false' and '$(TreatWarningsAsErrors)' == 'true'">$(WarningsNotAsErrors);$(CodeAnalysisRuleIds)</WarningsNotAsErrors>
24
+ </PropertyGroup>
25
+ </Project>
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/Microsoft.CodeAnalysis.NetAnalyzers.targets ADDED
@@ -0,0 +1,646 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <Project>
2
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" BeforeTargets="CoreCompile" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true'">
3
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
4
+ <PropertyGroup>
5
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersRulesVersion' to 'EffectiveAnalysisLevel' with trimmed trailing '.0' -->
6
+ <MicrosoftCodeAnalysisNetAnalyzersRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersRulesVersion)' == '' and $(EffectiveAnalysisLevel) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevel), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersRulesVersion>
7
+
8
+ <!-- Set the default analysis mode, if not set by the user -->
9
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers>$(AnalysisLevelSuffix)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers>
10
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers)' == ''">$(AnalysisMode)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers>
11
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers>
12
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers>
13
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers>
14
+
15
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
16
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
17
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
18
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
19
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers_WarnAsErrorSuffix>
20
+
21
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
22
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers Condition="'$(MicrosoftCodeAnalysisNetAnalyzersRulesVersion)' != ''">AnalysisLevel_$(MicrosoftCodeAnalysisNetAnalyzersRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzers)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers>
23
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers>
24
+
25
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzers Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzers)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzers>
26
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzers Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzers)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzers)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzers>
27
+ </PropertyGroup>
28
+
29
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzers)')">
30
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzers)" />
31
+ </ItemGroup>
32
+ </Target>
33
+
34
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersDesign" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelDesign)' != '' or '$(AnalysisModeDesign)' != '')">
35
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
36
+ <PropertyGroup>
37
+ <!-- Default 'AnalysisLevelDesign' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixDesign', 'AnalysisLevelSuffixDesign' and 'EffectiveAnalysisLevelDesign' -->
38
+ <AnalysisLevelDesign Condition="'$(AnalysisLevelDesign)' == ''">$(AnalysisLevel)</AnalysisLevelDesign>
39
+
40
+ <!-- AnalysisLevelDesign can also contain compound values with a prefix and suffix separated by a '-' character.
41
+ The prefix indicates the core AnalysisLevel for 'Design' rules and the suffix indicates the bucket of
42
+ rules to enable for 'Design' rules by default. For example, some valid compound values for AnalysisLevelDesign are:
43
+ 1. '5-all' - Indicates core AnalysisLevelDesign = '5' with 'all' the 'Design' rules enabled by default.
44
+ 2. 'latest-none' - Indicates core AnalysisLevelDesign = 'latest' with 'none' of the 'Design' rules enabled by default.
45
+ AnalysisLevelPrefixDesign is used to set the EffectiveAnalysisLevelDesign below.
46
+ AnalysisLevelSuffixDesign is used to map to the correct global config.
47
+ -->
48
+ <AnalysisLevelPrefixDesign Condition="$(AnalysisLevelDesign.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelDesign), '-(.)*', ''))</AnalysisLevelPrefixDesign>
49
+ <AnalysisLevelSuffixDesign Condition="'$(AnalysisLevelPrefixDesign)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelDesign), '$(AnalysisLevelPrefixDesign)-', ''))</AnalysisLevelSuffixDesign>
50
+
51
+ <!-- EffectiveAnalysisLevelDesign is used to differentiate from user specified strings (such as 'none')
52
+ and an implied numerical option (such as '4') -->
53
+ <EffectiveAnalysisLevelDesign Condition="'$(AnalysisLevelDesign)' == 'none' or '$(AnalysisLevelPrefixDesign)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelDesign>
54
+ <EffectiveAnalysisLevelDesign Condition="'$(AnalysisLevelDesign)' == 'latest' or '$(AnalysisLevelPrefixDesign)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelDesign>
55
+ <EffectiveAnalysisLevelDesign Condition="'$(AnalysisLevelDesign)' == 'preview' or '$(AnalysisLevelPrefixDesign)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelDesign>
56
+
57
+ <!-- Set EffectiveAnalysisLevelDesign to the value of AnalysisLevelDesign if it is a version number -->
58
+ <EffectiveAnalysisLevelDesign Condition="'$(EffectiveAnalysisLevelDesign)' == '' And
59
+ '$(AnalysisLevelPrefixDesign)' != ''">$(AnalysisLevelPrefixDesign)</EffectiveAnalysisLevelDesign>
60
+ <EffectiveAnalysisLevelDesign Condition="'$(EffectiveAnalysisLevelDesign)' == '' And
61
+ '$(AnalysisLevelDesign)' != ''">$(AnalysisLevelDesign)</EffectiveAnalysisLevelDesign>
62
+
63
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersDesignRulesVersion' to 'EffectiveAnalysisLevelDesign' with trimmed trailing '.0' -->
64
+ <MicrosoftCodeAnalysisNetAnalyzersDesignRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersDesignRulesVersion)' == '' and $(EffectiveAnalysisLevelDesign) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelDesign), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersDesignRulesVersion>
65
+
66
+ <!-- Set the default analysis mode, if not set by the user -->
67
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign>$(AnalysisLevelSuffixDesign)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign>
68
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign)' == ''">$(AnalysisModeDesign)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign>
69
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign>
70
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign>
71
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign>
72
+
73
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
74
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
75
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
76
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
77
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign_WarnAsErrorSuffix>
78
+
79
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersDesignRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
80
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign Condition="'$(MicrosoftCodeAnalysisNetAnalyzersDesignRulesVersion)' != ''">AnalysisLevelDesign_$(MicrosoftCodeAnalysisNetAnalyzersDesignRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDesign)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign>
81
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign>
82
+
83
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersDesign Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersDesign)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersDesign>
84
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersDesign Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersDesign)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDesign)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersDesign>
85
+ </PropertyGroup>
86
+
87
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersDesign)')">
88
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersDesign)" />
89
+ </ItemGroup>
90
+ </Target>
91
+
92
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersDocumentation" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelDocumentation)' != '' or '$(AnalysisModeDocumentation)' != '')">
93
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
94
+ <PropertyGroup>
95
+ <!-- Default 'AnalysisLevelDocumentation' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixDocumentation', 'AnalysisLevelSuffixDocumentation' and 'EffectiveAnalysisLevelDocumentation' -->
96
+ <AnalysisLevelDocumentation Condition="'$(AnalysisLevelDocumentation)' == ''">$(AnalysisLevel)</AnalysisLevelDocumentation>
97
+
98
+ <!-- AnalysisLevelDocumentation can also contain compound values with a prefix and suffix separated by a '-' character.
99
+ The prefix indicates the core AnalysisLevel for 'Documentation' rules and the suffix indicates the bucket of
100
+ rules to enable for 'Documentation' rules by default. For example, some valid compound values for AnalysisLevelDocumentation are:
101
+ 1. '5-all' - Indicates core AnalysisLevelDocumentation = '5' with 'all' the 'Documentation' rules enabled by default.
102
+ 2. 'latest-none' - Indicates core AnalysisLevelDocumentation = 'latest' with 'none' of the 'Documentation' rules enabled by default.
103
+ AnalysisLevelPrefixDocumentation is used to set the EffectiveAnalysisLevelDocumentation below.
104
+ AnalysisLevelSuffixDocumentation is used to map to the correct global config.
105
+ -->
106
+ <AnalysisLevelPrefixDocumentation Condition="$(AnalysisLevelDocumentation.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelDocumentation), '-(.)*', ''))</AnalysisLevelPrefixDocumentation>
107
+ <AnalysisLevelSuffixDocumentation Condition="'$(AnalysisLevelPrefixDocumentation)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelDocumentation), '$(AnalysisLevelPrefixDocumentation)-', ''))</AnalysisLevelSuffixDocumentation>
108
+
109
+ <!-- EffectiveAnalysisLevelDocumentation is used to differentiate from user specified strings (such as 'none')
110
+ and an implied numerical option (such as '4') -->
111
+ <EffectiveAnalysisLevelDocumentation Condition="'$(AnalysisLevelDocumentation)' == 'none' or '$(AnalysisLevelPrefixDocumentation)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelDocumentation>
112
+ <EffectiveAnalysisLevelDocumentation Condition="'$(AnalysisLevelDocumentation)' == 'latest' or '$(AnalysisLevelPrefixDocumentation)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelDocumentation>
113
+ <EffectiveAnalysisLevelDocumentation Condition="'$(AnalysisLevelDocumentation)' == 'preview' or '$(AnalysisLevelPrefixDocumentation)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelDocumentation>
114
+
115
+ <!-- Set EffectiveAnalysisLevelDocumentation to the value of AnalysisLevelDocumentation if it is a version number -->
116
+ <EffectiveAnalysisLevelDocumentation Condition="'$(EffectiveAnalysisLevelDocumentation)' == '' And
117
+ '$(AnalysisLevelPrefixDocumentation)' != ''">$(AnalysisLevelPrefixDocumentation)</EffectiveAnalysisLevelDocumentation>
118
+ <EffectiveAnalysisLevelDocumentation Condition="'$(EffectiveAnalysisLevelDocumentation)' == '' And
119
+ '$(AnalysisLevelDocumentation)' != ''">$(AnalysisLevelDocumentation)</EffectiveAnalysisLevelDocumentation>
120
+
121
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersDocumentationRulesVersion' to 'EffectiveAnalysisLevelDocumentation' with trimmed trailing '.0' -->
122
+ <MicrosoftCodeAnalysisNetAnalyzersDocumentationRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersDocumentationRulesVersion)' == '' and $(EffectiveAnalysisLevelDocumentation) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelDocumentation), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersDocumentationRulesVersion>
123
+
124
+ <!-- Set the default analysis mode, if not set by the user -->
125
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation>$(AnalysisLevelSuffixDocumentation)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation>
126
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation)' == ''">$(AnalysisModeDocumentation)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation>
127
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation>
128
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation>
129
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation>
130
+
131
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
132
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
133
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
134
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
135
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation_WarnAsErrorSuffix>
136
+
137
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersDocumentationRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
138
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation Condition="'$(MicrosoftCodeAnalysisNetAnalyzersDocumentationRulesVersion)' != ''">AnalysisLevelDocumentation_$(MicrosoftCodeAnalysisNetAnalyzersDocumentationRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersDocumentation)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation>
139
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation>
140
+
141
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersDocumentation Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersDocumentation)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersDocumentation>
142
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersDocumentation Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersDocumentation)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersDocumentation)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersDocumentation>
143
+ </PropertyGroup>
144
+
145
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersDocumentation)')">
146
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersDocumentation)" />
147
+ </ItemGroup>
148
+ </Target>
149
+
150
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersGlobalization" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelGlobalization)' != '' or '$(AnalysisModeGlobalization)' != '')">
151
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
152
+ <PropertyGroup>
153
+ <!-- Default 'AnalysisLevelGlobalization' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixGlobalization', 'AnalysisLevelSuffixGlobalization' and 'EffectiveAnalysisLevelGlobalization' -->
154
+ <AnalysisLevelGlobalization Condition="'$(AnalysisLevelGlobalization)' == ''">$(AnalysisLevel)</AnalysisLevelGlobalization>
155
+
156
+ <!-- AnalysisLevelGlobalization can also contain compound values with a prefix and suffix separated by a '-' character.
157
+ The prefix indicates the core AnalysisLevel for 'Globalization' rules and the suffix indicates the bucket of
158
+ rules to enable for 'Globalization' rules by default. For example, some valid compound values for AnalysisLevelGlobalization are:
159
+ 1. '5-all' - Indicates core AnalysisLevelGlobalization = '5' with 'all' the 'Globalization' rules enabled by default.
160
+ 2. 'latest-none' - Indicates core AnalysisLevelGlobalization = 'latest' with 'none' of the 'Globalization' rules enabled by default.
161
+ AnalysisLevelPrefixGlobalization is used to set the EffectiveAnalysisLevelGlobalization below.
162
+ AnalysisLevelSuffixGlobalization is used to map to the correct global config.
163
+ -->
164
+ <AnalysisLevelPrefixGlobalization Condition="$(AnalysisLevelGlobalization.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelGlobalization), '-(.)*', ''))</AnalysisLevelPrefixGlobalization>
165
+ <AnalysisLevelSuffixGlobalization Condition="'$(AnalysisLevelPrefixGlobalization)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelGlobalization), '$(AnalysisLevelPrefixGlobalization)-', ''))</AnalysisLevelSuffixGlobalization>
166
+
167
+ <!-- EffectiveAnalysisLevelGlobalization is used to differentiate from user specified strings (such as 'none')
168
+ and an implied numerical option (such as '4') -->
169
+ <EffectiveAnalysisLevelGlobalization Condition="'$(AnalysisLevelGlobalization)' == 'none' or '$(AnalysisLevelPrefixGlobalization)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelGlobalization>
170
+ <EffectiveAnalysisLevelGlobalization Condition="'$(AnalysisLevelGlobalization)' == 'latest' or '$(AnalysisLevelPrefixGlobalization)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelGlobalization>
171
+ <EffectiveAnalysisLevelGlobalization Condition="'$(AnalysisLevelGlobalization)' == 'preview' or '$(AnalysisLevelPrefixGlobalization)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelGlobalization>
172
+
173
+ <!-- Set EffectiveAnalysisLevelGlobalization to the value of AnalysisLevelGlobalization if it is a version number -->
174
+ <EffectiveAnalysisLevelGlobalization Condition="'$(EffectiveAnalysisLevelGlobalization)' == '' And
175
+ '$(AnalysisLevelPrefixGlobalization)' != ''">$(AnalysisLevelPrefixGlobalization)</EffectiveAnalysisLevelGlobalization>
176
+ <EffectiveAnalysisLevelGlobalization Condition="'$(EffectiveAnalysisLevelGlobalization)' == '' And
177
+ '$(AnalysisLevelGlobalization)' != ''">$(AnalysisLevelGlobalization)</EffectiveAnalysisLevelGlobalization>
178
+
179
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersGlobalizationRulesVersion' to 'EffectiveAnalysisLevelGlobalization' with trimmed trailing '.0' -->
180
+ <MicrosoftCodeAnalysisNetAnalyzersGlobalizationRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersGlobalizationRulesVersion)' == '' and $(EffectiveAnalysisLevelGlobalization) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelGlobalization), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersGlobalizationRulesVersion>
181
+
182
+ <!-- Set the default analysis mode, if not set by the user -->
183
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization>$(AnalysisLevelSuffixGlobalization)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization>
184
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization)' == ''">$(AnalysisModeGlobalization)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization>
185
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization>
186
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization>
187
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization>
188
+
189
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
190
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
191
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
192
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
193
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization_WarnAsErrorSuffix>
194
+
195
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersGlobalizationRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
196
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization Condition="'$(MicrosoftCodeAnalysisNetAnalyzersGlobalizationRulesVersion)' != ''">AnalysisLevelGlobalization_$(MicrosoftCodeAnalysisNetAnalyzersGlobalizationRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersGlobalization)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization>
197
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization>
198
+
199
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersGlobalization Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersGlobalization)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersGlobalization>
200
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersGlobalization Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersGlobalization)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersGlobalization)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersGlobalization>
201
+ </PropertyGroup>
202
+
203
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersGlobalization)')">
204
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersGlobalization)" />
205
+ </ItemGroup>
206
+ </Target>
207
+
208
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersInteroperability" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelInteroperability)' != '' or '$(AnalysisModeInteroperability)' != '')">
209
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
210
+ <PropertyGroup>
211
+ <!-- Default 'AnalysisLevelInteroperability' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixInteroperability', 'AnalysisLevelSuffixInteroperability' and 'EffectiveAnalysisLevelInteroperability' -->
212
+ <AnalysisLevelInteroperability Condition="'$(AnalysisLevelInteroperability)' == ''">$(AnalysisLevel)</AnalysisLevelInteroperability>
213
+
214
+ <!-- AnalysisLevelInteroperability can also contain compound values with a prefix and suffix separated by a '-' character.
215
+ The prefix indicates the core AnalysisLevel for 'Interoperability' rules and the suffix indicates the bucket of
216
+ rules to enable for 'Interoperability' rules by default. For example, some valid compound values for AnalysisLevelInteroperability are:
217
+ 1. '5-all' - Indicates core AnalysisLevelInteroperability = '5' with 'all' the 'Interoperability' rules enabled by default.
218
+ 2. 'latest-none' - Indicates core AnalysisLevelInteroperability = 'latest' with 'none' of the 'Interoperability' rules enabled by default.
219
+ AnalysisLevelPrefixInteroperability is used to set the EffectiveAnalysisLevelInteroperability below.
220
+ AnalysisLevelSuffixInteroperability is used to map to the correct global config.
221
+ -->
222
+ <AnalysisLevelPrefixInteroperability Condition="$(AnalysisLevelInteroperability.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelInteroperability), '-(.)*', ''))</AnalysisLevelPrefixInteroperability>
223
+ <AnalysisLevelSuffixInteroperability Condition="'$(AnalysisLevelPrefixInteroperability)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelInteroperability), '$(AnalysisLevelPrefixInteroperability)-', ''))</AnalysisLevelSuffixInteroperability>
224
+
225
+ <!-- EffectiveAnalysisLevelInteroperability is used to differentiate from user specified strings (such as 'none')
226
+ and an implied numerical option (such as '4') -->
227
+ <EffectiveAnalysisLevelInteroperability Condition="'$(AnalysisLevelInteroperability)' == 'none' or '$(AnalysisLevelPrefixInteroperability)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelInteroperability>
228
+ <EffectiveAnalysisLevelInteroperability Condition="'$(AnalysisLevelInteroperability)' == 'latest' or '$(AnalysisLevelPrefixInteroperability)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelInteroperability>
229
+ <EffectiveAnalysisLevelInteroperability Condition="'$(AnalysisLevelInteroperability)' == 'preview' or '$(AnalysisLevelPrefixInteroperability)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelInteroperability>
230
+
231
+ <!-- Set EffectiveAnalysisLevelInteroperability to the value of AnalysisLevelInteroperability if it is a version number -->
232
+ <EffectiveAnalysisLevelInteroperability Condition="'$(EffectiveAnalysisLevelInteroperability)' == '' And
233
+ '$(AnalysisLevelPrefixInteroperability)' != ''">$(AnalysisLevelPrefixInteroperability)</EffectiveAnalysisLevelInteroperability>
234
+ <EffectiveAnalysisLevelInteroperability Condition="'$(EffectiveAnalysisLevelInteroperability)' == '' And
235
+ '$(AnalysisLevelInteroperability)' != ''">$(AnalysisLevelInteroperability)</EffectiveAnalysisLevelInteroperability>
236
+
237
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersInteroperabilityRulesVersion' to 'EffectiveAnalysisLevelInteroperability' with trimmed trailing '.0' -->
238
+ <MicrosoftCodeAnalysisNetAnalyzersInteroperabilityRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersInteroperabilityRulesVersion)' == '' and $(EffectiveAnalysisLevelInteroperability) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelInteroperability), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersInteroperabilityRulesVersion>
239
+
240
+ <!-- Set the default analysis mode, if not set by the user -->
241
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability>$(AnalysisLevelSuffixInteroperability)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability>
242
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability)' == ''">$(AnalysisModeInteroperability)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability>
243
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability>
244
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability>
245
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability>
246
+
247
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
248
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
249
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
250
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
251
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability_WarnAsErrorSuffix>
252
+
253
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersInteroperabilityRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
254
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability Condition="'$(MicrosoftCodeAnalysisNetAnalyzersInteroperabilityRulesVersion)' != ''">AnalysisLevelInteroperability_$(MicrosoftCodeAnalysisNetAnalyzersInteroperabilityRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersInteroperability)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability>
255
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability>
256
+
257
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersInteroperability Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersInteroperability)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersInteroperability>
258
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersInteroperability Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersInteroperability)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersInteroperability)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersInteroperability>
259
+ </PropertyGroup>
260
+
261
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersInteroperability)')">
262
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersInteroperability)" />
263
+ </ItemGroup>
264
+ </Target>
265
+
266
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersMaintainability" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelMaintainability)' != '' or '$(AnalysisModeMaintainability)' != '')">
267
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
268
+ <PropertyGroup>
269
+ <!-- Default 'AnalysisLevelMaintainability' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixMaintainability', 'AnalysisLevelSuffixMaintainability' and 'EffectiveAnalysisLevelMaintainability' -->
270
+ <AnalysisLevelMaintainability Condition="'$(AnalysisLevelMaintainability)' == ''">$(AnalysisLevel)</AnalysisLevelMaintainability>
271
+
272
+ <!-- AnalysisLevelMaintainability can also contain compound values with a prefix and suffix separated by a '-' character.
273
+ The prefix indicates the core AnalysisLevel for 'Maintainability' rules and the suffix indicates the bucket of
274
+ rules to enable for 'Maintainability' rules by default. For example, some valid compound values for AnalysisLevelMaintainability are:
275
+ 1. '5-all' - Indicates core AnalysisLevelMaintainability = '5' with 'all' the 'Maintainability' rules enabled by default.
276
+ 2. 'latest-none' - Indicates core AnalysisLevelMaintainability = 'latest' with 'none' of the 'Maintainability' rules enabled by default.
277
+ AnalysisLevelPrefixMaintainability is used to set the EffectiveAnalysisLevelMaintainability below.
278
+ AnalysisLevelSuffixMaintainability is used to map to the correct global config.
279
+ -->
280
+ <AnalysisLevelPrefixMaintainability Condition="$(AnalysisLevelMaintainability.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelMaintainability), '-(.)*', ''))</AnalysisLevelPrefixMaintainability>
281
+ <AnalysisLevelSuffixMaintainability Condition="'$(AnalysisLevelPrefixMaintainability)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelMaintainability), '$(AnalysisLevelPrefixMaintainability)-', ''))</AnalysisLevelSuffixMaintainability>
282
+
283
+ <!-- EffectiveAnalysisLevelMaintainability is used to differentiate from user specified strings (such as 'none')
284
+ and an implied numerical option (such as '4') -->
285
+ <EffectiveAnalysisLevelMaintainability Condition="'$(AnalysisLevelMaintainability)' == 'none' or '$(AnalysisLevelPrefixMaintainability)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelMaintainability>
286
+ <EffectiveAnalysisLevelMaintainability Condition="'$(AnalysisLevelMaintainability)' == 'latest' or '$(AnalysisLevelPrefixMaintainability)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelMaintainability>
287
+ <EffectiveAnalysisLevelMaintainability Condition="'$(AnalysisLevelMaintainability)' == 'preview' or '$(AnalysisLevelPrefixMaintainability)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelMaintainability>
288
+
289
+ <!-- Set EffectiveAnalysisLevelMaintainability to the value of AnalysisLevelMaintainability if it is a version number -->
290
+ <EffectiveAnalysisLevelMaintainability Condition="'$(EffectiveAnalysisLevelMaintainability)' == '' And
291
+ '$(AnalysisLevelPrefixMaintainability)' != ''">$(AnalysisLevelPrefixMaintainability)</EffectiveAnalysisLevelMaintainability>
292
+ <EffectiveAnalysisLevelMaintainability Condition="'$(EffectiveAnalysisLevelMaintainability)' == '' And
293
+ '$(AnalysisLevelMaintainability)' != ''">$(AnalysisLevelMaintainability)</EffectiveAnalysisLevelMaintainability>
294
+
295
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersMaintainabilityRulesVersion' to 'EffectiveAnalysisLevelMaintainability' with trimmed trailing '.0' -->
296
+ <MicrosoftCodeAnalysisNetAnalyzersMaintainabilityRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersMaintainabilityRulesVersion)' == '' and $(EffectiveAnalysisLevelMaintainability) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelMaintainability), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersMaintainabilityRulesVersion>
297
+
298
+ <!-- Set the default analysis mode, if not set by the user -->
299
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability>$(AnalysisLevelSuffixMaintainability)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability>
300
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability)' == ''">$(AnalysisModeMaintainability)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability>
301
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability>
302
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability>
303
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability>
304
+
305
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
306
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
307
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
308
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
309
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability_WarnAsErrorSuffix>
310
+
311
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersMaintainabilityRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
312
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability Condition="'$(MicrosoftCodeAnalysisNetAnalyzersMaintainabilityRulesVersion)' != ''">AnalysisLevelMaintainability_$(MicrosoftCodeAnalysisNetAnalyzersMaintainabilityRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersMaintainability)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability>
313
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability>
314
+
315
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersMaintainability Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersMaintainability)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersMaintainability>
316
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersMaintainability Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersMaintainability)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersMaintainability)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersMaintainability>
317
+ </PropertyGroup>
318
+
319
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersMaintainability)')">
320
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersMaintainability)" />
321
+ </ItemGroup>
322
+ </Target>
323
+
324
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersNaming" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelNaming)' != '' or '$(AnalysisModeNaming)' != '')">
325
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
326
+ <PropertyGroup>
327
+ <!-- Default 'AnalysisLevelNaming' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixNaming', 'AnalysisLevelSuffixNaming' and 'EffectiveAnalysisLevelNaming' -->
328
+ <AnalysisLevelNaming Condition="'$(AnalysisLevelNaming)' == ''">$(AnalysisLevel)</AnalysisLevelNaming>
329
+
330
+ <!-- AnalysisLevelNaming can also contain compound values with a prefix and suffix separated by a '-' character.
331
+ The prefix indicates the core AnalysisLevel for 'Naming' rules and the suffix indicates the bucket of
332
+ rules to enable for 'Naming' rules by default. For example, some valid compound values for AnalysisLevelNaming are:
333
+ 1. '5-all' - Indicates core AnalysisLevelNaming = '5' with 'all' the 'Naming' rules enabled by default.
334
+ 2. 'latest-none' - Indicates core AnalysisLevelNaming = 'latest' with 'none' of the 'Naming' rules enabled by default.
335
+ AnalysisLevelPrefixNaming is used to set the EffectiveAnalysisLevelNaming below.
336
+ AnalysisLevelSuffixNaming is used to map to the correct global config.
337
+ -->
338
+ <AnalysisLevelPrefixNaming Condition="$(AnalysisLevelNaming.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelNaming), '-(.)*', ''))</AnalysisLevelPrefixNaming>
339
+ <AnalysisLevelSuffixNaming Condition="'$(AnalysisLevelPrefixNaming)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelNaming), '$(AnalysisLevelPrefixNaming)-', ''))</AnalysisLevelSuffixNaming>
340
+
341
+ <!-- EffectiveAnalysisLevelNaming is used to differentiate from user specified strings (such as 'none')
342
+ and an implied numerical option (such as '4') -->
343
+ <EffectiveAnalysisLevelNaming Condition="'$(AnalysisLevelNaming)' == 'none' or '$(AnalysisLevelPrefixNaming)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelNaming>
344
+ <EffectiveAnalysisLevelNaming Condition="'$(AnalysisLevelNaming)' == 'latest' or '$(AnalysisLevelPrefixNaming)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelNaming>
345
+ <EffectiveAnalysisLevelNaming Condition="'$(AnalysisLevelNaming)' == 'preview' or '$(AnalysisLevelPrefixNaming)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelNaming>
346
+
347
+ <!-- Set EffectiveAnalysisLevelNaming to the value of AnalysisLevelNaming if it is a version number -->
348
+ <EffectiveAnalysisLevelNaming Condition="'$(EffectiveAnalysisLevelNaming)' == '' And
349
+ '$(AnalysisLevelPrefixNaming)' != ''">$(AnalysisLevelPrefixNaming)</EffectiveAnalysisLevelNaming>
350
+ <EffectiveAnalysisLevelNaming Condition="'$(EffectiveAnalysisLevelNaming)' == '' And
351
+ '$(AnalysisLevelNaming)' != ''">$(AnalysisLevelNaming)</EffectiveAnalysisLevelNaming>
352
+
353
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersNamingRulesVersion' to 'EffectiveAnalysisLevelNaming' with trimmed trailing '.0' -->
354
+ <MicrosoftCodeAnalysisNetAnalyzersNamingRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersNamingRulesVersion)' == '' and $(EffectiveAnalysisLevelNaming) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelNaming), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersNamingRulesVersion>
355
+
356
+ <!-- Set the default analysis mode, if not set by the user -->
357
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming>$(AnalysisLevelSuffixNaming)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming>
358
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming)' == ''">$(AnalysisModeNaming)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming>
359
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming>
360
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming>
361
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming>
362
+
363
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
364
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
365
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
366
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
367
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming_WarnAsErrorSuffix>
368
+
369
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersNamingRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
370
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming Condition="'$(MicrosoftCodeAnalysisNetAnalyzersNamingRulesVersion)' != ''">AnalysisLevelNaming_$(MicrosoftCodeAnalysisNetAnalyzersNamingRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersNaming)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming>
371
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming>
372
+
373
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersNaming Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersNaming)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersNaming>
374
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersNaming Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersNaming)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersNaming)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersNaming>
375
+ </PropertyGroup>
376
+
377
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersNaming)')">
378
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersNaming)" />
379
+ </ItemGroup>
380
+ </Target>
381
+
382
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersPerformance" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelPerformance)' != '' or '$(AnalysisModePerformance)' != '')">
383
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
384
+ <PropertyGroup>
385
+ <!-- Default 'AnalysisLevelPerformance' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixPerformance', 'AnalysisLevelSuffixPerformance' and 'EffectiveAnalysisLevelPerformance' -->
386
+ <AnalysisLevelPerformance Condition="'$(AnalysisLevelPerformance)' == ''">$(AnalysisLevel)</AnalysisLevelPerformance>
387
+
388
+ <!-- AnalysisLevelPerformance can also contain compound values with a prefix and suffix separated by a '-' character.
389
+ The prefix indicates the core AnalysisLevel for 'Performance' rules and the suffix indicates the bucket of
390
+ rules to enable for 'Performance' rules by default. For example, some valid compound values for AnalysisLevelPerformance are:
391
+ 1. '5-all' - Indicates core AnalysisLevelPerformance = '5' with 'all' the 'Performance' rules enabled by default.
392
+ 2. 'latest-none' - Indicates core AnalysisLevelPerformance = 'latest' with 'none' of the 'Performance' rules enabled by default.
393
+ AnalysisLevelPrefixPerformance is used to set the EffectiveAnalysisLevelPerformance below.
394
+ AnalysisLevelSuffixPerformance is used to map to the correct global config.
395
+ -->
396
+ <AnalysisLevelPrefixPerformance Condition="$(AnalysisLevelPerformance.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelPerformance), '-(.)*', ''))</AnalysisLevelPrefixPerformance>
397
+ <AnalysisLevelSuffixPerformance Condition="'$(AnalysisLevelPrefixPerformance)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelPerformance), '$(AnalysisLevelPrefixPerformance)-', ''))</AnalysisLevelSuffixPerformance>
398
+
399
+ <!-- EffectiveAnalysisLevelPerformance is used to differentiate from user specified strings (such as 'none')
400
+ and an implied numerical option (such as '4') -->
401
+ <EffectiveAnalysisLevelPerformance Condition="'$(AnalysisLevelPerformance)' == 'none' or '$(AnalysisLevelPrefixPerformance)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelPerformance>
402
+ <EffectiveAnalysisLevelPerformance Condition="'$(AnalysisLevelPerformance)' == 'latest' or '$(AnalysisLevelPrefixPerformance)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelPerformance>
403
+ <EffectiveAnalysisLevelPerformance Condition="'$(AnalysisLevelPerformance)' == 'preview' or '$(AnalysisLevelPrefixPerformance)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelPerformance>
404
+
405
+ <!-- Set EffectiveAnalysisLevelPerformance to the value of AnalysisLevelPerformance if it is a version number -->
406
+ <EffectiveAnalysisLevelPerformance Condition="'$(EffectiveAnalysisLevelPerformance)' == '' And
407
+ '$(AnalysisLevelPrefixPerformance)' != ''">$(AnalysisLevelPrefixPerformance)</EffectiveAnalysisLevelPerformance>
408
+ <EffectiveAnalysisLevelPerformance Condition="'$(EffectiveAnalysisLevelPerformance)' == '' And
409
+ '$(AnalysisLevelPerformance)' != ''">$(AnalysisLevelPerformance)</EffectiveAnalysisLevelPerformance>
410
+
411
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersPerformanceRulesVersion' to 'EffectiveAnalysisLevelPerformance' with trimmed trailing '.0' -->
412
+ <MicrosoftCodeAnalysisNetAnalyzersPerformanceRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersPerformanceRulesVersion)' == '' and $(EffectiveAnalysisLevelPerformance) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelPerformance), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersPerformanceRulesVersion>
413
+
414
+ <!-- Set the default analysis mode, if not set by the user -->
415
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance>$(AnalysisLevelSuffixPerformance)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance>
416
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance)' == ''">$(AnalysisModePerformance)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance>
417
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance>
418
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance>
419
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance>
420
+
421
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
422
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
423
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
424
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
425
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance_WarnAsErrorSuffix>
426
+
427
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersPerformanceRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
428
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance Condition="'$(MicrosoftCodeAnalysisNetAnalyzersPerformanceRulesVersion)' != ''">AnalysisLevelPerformance_$(MicrosoftCodeAnalysisNetAnalyzersPerformanceRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersPerformance)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance>
429
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance>
430
+
431
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersPerformance Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersPerformance)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersPerformance>
432
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersPerformance Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersPerformance)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersPerformance)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersPerformance>
433
+ </PropertyGroup>
434
+
435
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersPerformance)')">
436
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersPerformance)" />
437
+ </ItemGroup>
438
+ </Target>
439
+
440
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersReliability" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelReliability)' != '' or '$(AnalysisModeReliability)' != '')">
441
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
442
+ <PropertyGroup>
443
+ <!-- Default 'AnalysisLevelReliability' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixReliability', 'AnalysisLevelSuffixReliability' and 'EffectiveAnalysisLevelReliability' -->
444
+ <AnalysisLevelReliability Condition="'$(AnalysisLevelReliability)' == ''">$(AnalysisLevel)</AnalysisLevelReliability>
445
+
446
+ <!-- AnalysisLevelReliability can also contain compound values with a prefix and suffix separated by a '-' character.
447
+ The prefix indicates the core AnalysisLevel for 'Reliability' rules and the suffix indicates the bucket of
448
+ rules to enable for 'Reliability' rules by default. For example, some valid compound values for AnalysisLevelReliability are:
449
+ 1. '5-all' - Indicates core AnalysisLevelReliability = '5' with 'all' the 'Reliability' rules enabled by default.
450
+ 2. 'latest-none' - Indicates core AnalysisLevelReliability = 'latest' with 'none' of the 'Reliability' rules enabled by default.
451
+ AnalysisLevelPrefixReliability is used to set the EffectiveAnalysisLevelReliability below.
452
+ AnalysisLevelSuffixReliability is used to map to the correct global config.
453
+ -->
454
+ <AnalysisLevelPrefixReliability Condition="$(AnalysisLevelReliability.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelReliability), '-(.)*', ''))</AnalysisLevelPrefixReliability>
455
+ <AnalysisLevelSuffixReliability Condition="'$(AnalysisLevelPrefixReliability)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelReliability), '$(AnalysisLevelPrefixReliability)-', ''))</AnalysisLevelSuffixReliability>
456
+
457
+ <!-- EffectiveAnalysisLevelReliability is used to differentiate from user specified strings (such as 'none')
458
+ and an implied numerical option (such as '4') -->
459
+ <EffectiveAnalysisLevelReliability Condition="'$(AnalysisLevelReliability)' == 'none' or '$(AnalysisLevelPrefixReliability)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelReliability>
460
+ <EffectiveAnalysisLevelReliability Condition="'$(AnalysisLevelReliability)' == 'latest' or '$(AnalysisLevelPrefixReliability)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelReliability>
461
+ <EffectiveAnalysisLevelReliability Condition="'$(AnalysisLevelReliability)' == 'preview' or '$(AnalysisLevelPrefixReliability)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelReliability>
462
+
463
+ <!-- Set EffectiveAnalysisLevelReliability to the value of AnalysisLevelReliability if it is a version number -->
464
+ <EffectiveAnalysisLevelReliability Condition="'$(EffectiveAnalysisLevelReliability)' == '' And
465
+ '$(AnalysisLevelPrefixReliability)' != ''">$(AnalysisLevelPrefixReliability)</EffectiveAnalysisLevelReliability>
466
+ <EffectiveAnalysisLevelReliability Condition="'$(EffectiveAnalysisLevelReliability)' == '' And
467
+ '$(AnalysisLevelReliability)' != ''">$(AnalysisLevelReliability)</EffectiveAnalysisLevelReliability>
468
+
469
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersReliabilityRulesVersion' to 'EffectiveAnalysisLevelReliability' with trimmed trailing '.0' -->
470
+ <MicrosoftCodeAnalysisNetAnalyzersReliabilityRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersReliabilityRulesVersion)' == '' and $(EffectiveAnalysisLevelReliability) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelReliability), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersReliabilityRulesVersion>
471
+
472
+ <!-- Set the default analysis mode, if not set by the user -->
473
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability>$(AnalysisLevelSuffixReliability)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability>
474
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability)' == ''">$(AnalysisModeReliability)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability>
475
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability>
476
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability>
477
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability>
478
+
479
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
480
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
481
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
482
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
483
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability_WarnAsErrorSuffix>
484
+
485
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersReliabilityRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
486
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability Condition="'$(MicrosoftCodeAnalysisNetAnalyzersReliabilityRulesVersion)' != ''">AnalysisLevelReliability_$(MicrosoftCodeAnalysisNetAnalyzersReliabilityRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersReliability)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability>
487
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability>
488
+
489
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersReliability Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersReliability)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersReliability>
490
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersReliability Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersReliability)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersReliability)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersReliability>
491
+ </PropertyGroup>
492
+
493
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersReliability)')">
494
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersReliability)" />
495
+ </ItemGroup>
496
+ </Target>
497
+
498
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersSecurity" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelSecurity)' != '' or '$(AnalysisModeSecurity)' != '')">
499
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
500
+ <PropertyGroup>
501
+ <!-- Default 'AnalysisLevelSecurity' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixSecurity', 'AnalysisLevelSuffixSecurity' and 'EffectiveAnalysisLevelSecurity' -->
502
+ <AnalysisLevelSecurity Condition="'$(AnalysisLevelSecurity)' == ''">$(AnalysisLevel)</AnalysisLevelSecurity>
503
+
504
+ <!-- AnalysisLevelSecurity can also contain compound values with a prefix and suffix separated by a '-' character.
505
+ The prefix indicates the core AnalysisLevel for 'Security' rules and the suffix indicates the bucket of
506
+ rules to enable for 'Security' rules by default. For example, some valid compound values for AnalysisLevelSecurity are:
507
+ 1. '5-all' - Indicates core AnalysisLevelSecurity = '5' with 'all' the 'Security' rules enabled by default.
508
+ 2. 'latest-none' - Indicates core AnalysisLevelSecurity = 'latest' with 'none' of the 'Security' rules enabled by default.
509
+ AnalysisLevelPrefixSecurity is used to set the EffectiveAnalysisLevelSecurity below.
510
+ AnalysisLevelSuffixSecurity is used to map to the correct global config.
511
+ -->
512
+ <AnalysisLevelPrefixSecurity Condition="$(AnalysisLevelSecurity.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelSecurity), '-(.)*', ''))</AnalysisLevelPrefixSecurity>
513
+ <AnalysisLevelSuffixSecurity Condition="'$(AnalysisLevelPrefixSecurity)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelSecurity), '$(AnalysisLevelPrefixSecurity)-', ''))</AnalysisLevelSuffixSecurity>
514
+
515
+ <!-- EffectiveAnalysisLevelSecurity is used to differentiate from user specified strings (such as 'none')
516
+ and an implied numerical option (such as '4') -->
517
+ <EffectiveAnalysisLevelSecurity Condition="'$(AnalysisLevelSecurity)' == 'none' or '$(AnalysisLevelPrefixSecurity)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelSecurity>
518
+ <EffectiveAnalysisLevelSecurity Condition="'$(AnalysisLevelSecurity)' == 'latest' or '$(AnalysisLevelPrefixSecurity)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelSecurity>
519
+ <EffectiveAnalysisLevelSecurity Condition="'$(AnalysisLevelSecurity)' == 'preview' or '$(AnalysisLevelPrefixSecurity)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelSecurity>
520
+
521
+ <!-- Set EffectiveAnalysisLevelSecurity to the value of AnalysisLevelSecurity if it is a version number -->
522
+ <EffectiveAnalysisLevelSecurity Condition="'$(EffectiveAnalysisLevelSecurity)' == '' And
523
+ '$(AnalysisLevelPrefixSecurity)' != ''">$(AnalysisLevelPrefixSecurity)</EffectiveAnalysisLevelSecurity>
524
+ <EffectiveAnalysisLevelSecurity Condition="'$(EffectiveAnalysisLevelSecurity)' == '' And
525
+ '$(AnalysisLevelSecurity)' != ''">$(AnalysisLevelSecurity)</EffectiveAnalysisLevelSecurity>
526
+
527
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersSecurityRulesVersion' to 'EffectiveAnalysisLevelSecurity' with trimmed trailing '.0' -->
528
+ <MicrosoftCodeAnalysisNetAnalyzersSecurityRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersSecurityRulesVersion)' == '' and $(EffectiveAnalysisLevelSecurity) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelSecurity), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersSecurityRulesVersion>
529
+
530
+ <!-- Set the default analysis mode, if not set by the user -->
531
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity>$(AnalysisLevelSuffixSecurity)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity>
532
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity)' == ''">$(AnalysisModeSecurity)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity>
533
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity>
534
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity>
535
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity>
536
+
537
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
538
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
539
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
540
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
541
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity_WarnAsErrorSuffix>
542
+
543
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersSecurityRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
544
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity Condition="'$(MicrosoftCodeAnalysisNetAnalyzersSecurityRulesVersion)' != ''">AnalysisLevelSecurity_$(MicrosoftCodeAnalysisNetAnalyzersSecurityRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersSecurity)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity>
545
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity>
546
+
547
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersSecurity Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersSecurity)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersSecurity>
548
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersSecurity Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersSecurity)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersSecurity)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersSecurity>
549
+ </PropertyGroup>
550
+
551
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersSecurity)')">
552
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersSecurity)" />
553
+ </ItemGroup>
554
+ </Target>
555
+
556
+ <Target Name="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzersUsage" BeforeTargets="CoreCompile" AfterTargets="AddGlobalAnalyzerConfigForPackage_MicrosoftCodeAnalysisNetAnalyzers" Condition="'$(SkipGlobalAnalyzerConfigForPackage)' != 'true' and ('$(AnalysisLevelUsage)' != '' or '$(AnalysisModeUsage)' != '')">
557
+ <!-- PropertyGroup to compute global analyzer config file to be used -->
558
+ <PropertyGroup>
559
+ <!-- Default 'AnalysisLevelUsage' to the core 'AnalysisLevel' and compute 'AnalysisLevelPrefixUsage', 'AnalysisLevelSuffixUsage' and 'EffectiveAnalysisLevelUsage' -->
560
+ <AnalysisLevelUsage Condition="'$(AnalysisLevelUsage)' == ''">$(AnalysisLevel)</AnalysisLevelUsage>
561
+
562
+ <!-- AnalysisLevelUsage can also contain compound values with a prefix and suffix separated by a '-' character.
563
+ The prefix indicates the core AnalysisLevel for 'Usage' rules and the suffix indicates the bucket of
564
+ rules to enable for 'Usage' rules by default. For example, some valid compound values for AnalysisLevelUsage are:
565
+ 1. '5-all' - Indicates core AnalysisLevelUsage = '5' with 'all' the 'Usage' rules enabled by default.
566
+ 2. 'latest-none' - Indicates core AnalysisLevelUsage = 'latest' with 'none' of the 'Usage' rules enabled by default.
567
+ AnalysisLevelPrefixUsage is used to set the EffectiveAnalysisLevelUsage below.
568
+ AnalysisLevelSuffixUsage is used to map to the correct global config.
569
+ -->
570
+ <AnalysisLevelPrefixUsage Condition="$(AnalysisLevelUsage.Contains('-'))">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelUsage), '-(.)*', ''))</AnalysisLevelPrefixUsage>
571
+ <AnalysisLevelSuffixUsage Condition="'$(AnalysisLevelPrefixUsage)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(AnalysisLevelUsage), '$(AnalysisLevelPrefixUsage)-', ''))</AnalysisLevelSuffixUsage>
572
+
573
+ <!-- EffectiveAnalysisLevelUsage is used to differentiate from user specified strings (such as 'none')
574
+ and an implied numerical option (such as '4') -->
575
+ <EffectiveAnalysisLevelUsage Condition="'$(AnalysisLevelUsage)' == 'none' or '$(AnalysisLevelPrefixUsage)' == 'none'">$(_NoneAnalysisLevel)</EffectiveAnalysisLevelUsage>
576
+ <EffectiveAnalysisLevelUsage Condition="'$(AnalysisLevelUsage)' == 'latest' or '$(AnalysisLevelPrefixUsage)' == 'latest'">$(_LatestAnalysisLevel)</EffectiveAnalysisLevelUsage>
577
+ <EffectiveAnalysisLevelUsage Condition="'$(AnalysisLevelUsage)' == 'preview' or '$(AnalysisLevelPrefixUsage)' == 'preview'">$(_PreviewAnalysisLevel)</EffectiveAnalysisLevelUsage>
578
+
579
+ <!-- Set EffectiveAnalysisLevelUsage to the value of AnalysisLevelUsage if it is a version number -->
580
+ <EffectiveAnalysisLevelUsage Condition="'$(EffectiveAnalysisLevelUsage)' == '' And
581
+ '$(AnalysisLevelPrefixUsage)' != ''">$(AnalysisLevelPrefixUsage)</EffectiveAnalysisLevelUsage>
582
+ <EffectiveAnalysisLevelUsage Condition="'$(EffectiveAnalysisLevelUsage)' == '' And
583
+ '$(AnalysisLevelUsage)' != ''">$(AnalysisLevelUsage)</EffectiveAnalysisLevelUsage>
584
+
585
+ <!-- Default 'MicrosoftCodeAnalysisNetAnalyzersUsageRulesVersion' to 'EffectiveAnalysisLevelUsage' with trimmed trailing '.0' -->
586
+ <MicrosoftCodeAnalysisNetAnalyzersUsageRulesVersion Condition="'$(MicrosoftCodeAnalysisNetAnalyzersUsageRulesVersion)' == '' and $(EffectiveAnalysisLevelUsage) != ''">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevelUsage), '(.0)*$', ''))</MicrosoftCodeAnalysisNetAnalyzersUsageRulesVersion>
587
+
588
+ <!-- Set the default analysis mode, if not set by the user -->
589
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage>$(AnalysisLevelSuffixUsage)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage>
590
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage)' == ''">$(AnalysisModeUsage)</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage>
591
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage)' == 'AllEnabledByDefault'">All</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage>
592
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage)' == 'AllDisabledByDefault'">None</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage>
593
+ <_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage Condition="'$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage)' == ''">Default</_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage>
594
+
595
+ <!-- Default 'EffectiveCodeAnalysisTreatWarningsAsErrors' to 'CodeAnalysisTreatWarningsAsErrors' for escalating relevant code analysis warnings to errors. -->
596
+ <!-- We use a separate property to allow users to override 'CodeAnalysisTreatWarningsAsErrors' implementation from .NET7 or older SDK, which had a known issue: https://github.com/dotnet/roslyn-analyzers/issues/6281 -->
597
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
598
+ <!-- Choose GlobalAnalyzerConfig file with '_warnaserror' suffix if 'EffectiveCodeAnalysisTreatWarningsAsErrors' is 'true'. -->
599
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage_WarnAsErrorSuffix Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'true'">_warnaserror</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage_WarnAsErrorSuffix>
600
+
601
+ <!-- GlobalAnalyzerConfig file name based on user specified package version 'MicrosoftCodeAnalysisNetAnalyzersUsageRulesVersion', if any. We replace '.' with '_' to map the version string to file name suffix. -->
602
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage Condition="'$(MicrosoftCodeAnalysisNetAnalyzersUsageRulesVersion)' != ''">AnalysisLevelUsage_$(MicrosoftCodeAnalysisNetAnalyzersUsageRulesVersion.Replace(".","_"))_$(_GlobalAnalyzerConfigAnalysisMode_MicrosoftCodeAnalysisNetAnalyzersUsage)$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage_WarnAsErrorSuffix).globalconfig</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage>
603
+ <_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage>$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage.ToLowerInvariant())</_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage>
604
+
605
+ <_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersUsage Condition="'$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersUsage)' == ''">$(MSBuildThisFileDirectory)config</_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersUsage>
606
+ <_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersUsage Condition="'$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage)' != ''">$(_GlobalAnalyzerConfigDir_MicrosoftCodeAnalysisNetAnalyzersUsage)\$(_GlobalAnalyzerConfigFileName_MicrosoftCodeAnalysisNetAnalyzersUsage)</_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersUsage>
607
+ </PropertyGroup>
608
+
609
+ <ItemGroup Condition="Exists('$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersUsage)')">
610
+ <EditorConfigFiles Include="$(_GlobalAnalyzerConfigFile_MicrosoftCodeAnalysisNetAnalyzersUsage)" />
611
+ </ItemGroup>
612
+ </Target>
613
+
614
+ <!-- MSBuild properties to thread to the analyzers as options -->
615
+ <ItemGroup>
616
+ <CompilerVisibleProperty Include="TargetFramework" />
617
+ <CompilerVisibleProperty Include="TargetPlatformMinVersion" />
618
+ <CompilerVisibleProperty Include="UsingMicrosoftNETSdkWeb" />
619
+ <CompilerVisibleProperty Include="ProjectTypeGuids" />
620
+ <CompilerVisibleProperty Include="InvariantGlobalization" />
621
+ <CompilerVisibleProperty Include="PlatformNeutralAssembly" />
622
+ <CompilerVisibleProperty Include="EnforceExtendedAnalyzerRules" />
623
+ </ItemGroup>
624
+
625
+ <!-- MSBuild item metadata to thread to the analyzers as options -->
626
+ <PropertyGroup>
627
+ <_SupportedPlatformList>@(SupportedPlatform, ',')</_SupportedPlatformList>
628
+ </PropertyGroup>
629
+
630
+ <!-- MSBuild properties to thread to the analyzers as options -->
631
+ <ItemGroup>
632
+ <CompilerVisibleProperty Include="_SupportedPlatformList" />
633
+ </ItemGroup>
634
+
635
+ <!--
636
+ Design-time target to handle 'CodeAnalysisTreatWarningsAsErrors = false' for the CA rule ids implemented in this package.
637
+ Note that a similar 'WarningsNotAsErrors' property group is present in the generated props file to ensure this functionality on command line builds.
638
+ -->
639
+ <Target Name="_CodeAnalysisTreatWarningsAsErrors" BeforeTargets="CoreCompile" Condition="'$(DesignTimeBuild)' == 'true' OR '$(BuildingProject)' != 'true'">
640
+ <PropertyGroup>
641
+ <EffectiveCodeAnalysisTreatWarningsAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == ''">$(CodeAnalysisTreatWarningsAsErrors)</EffectiveCodeAnalysisTreatWarningsAsErrors>
642
+ <WarningsNotAsErrors Condition="'$(EffectiveCodeAnalysisTreatWarningsAsErrors)' == 'false' and '$(TreatWarningsAsErrors)' == 'true'">$(WarningsNotAsErrors);$(CodeAnalysisRuleIds)</WarningsNotAsErrors>
643
+ </PropertyGroup>
644
+ </Target>
645
+
646
+ </Project>
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_all.globalconfig ADDED
@@ -0,0 +1,837 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'All' analysis mode
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'All' analysis mode. Rules that are first released in a version later than '10.0' are disabled.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1000: Do not declare static members on generic types
12
+ dotnet_diagnostic.CA1000.severity = warning
13
+
14
+ # CA1001: Types that own disposable fields should be disposable
15
+ dotnet_diagnostic.CA1001.severity = warning
16
+
17
+ # CA1002: Do not expose generic lists
18
+ dotnet_diagnostic.CA1002.severity = warning
19
+
20
+ # CA1003: Use generic event handler instances
21
+ dotnet_diagnostic.CA1003.severity = warning
22
+
23
+ # CA1008: Enums should have zero value
24
+ dotnet_diagnostic.CA1008.severity = warning
25
+
26
+ # CA1010: Generic interface should also be implemented
27
+ dotnet_diagnostic.CA1010.severity = warning
28
+
29
+ # CA1012: Abstract types should not have public constructors
30
+ dotnet_diagnostic.CA1012.severity = warning
31
+
32
+ # CA1016: Mark assemblies with assembly version
33
+ dotnet_diagnostic.CA1016.severity = warning
34
+
35
+ # CA1018: Mark attributes with AttributeUsageAttribute
36
+ dotnet_diagnostic.CA1018.severity = warning
37
+
38
+ # CA1019: Define accessors for attribute arguments
39
+ dotnet_diagnostic.CA1019.severity = warning
40
+
41
+ # CA1024: Use properties where appropriate
42
+ dotnet_diagnostic.CA1024.severity = warning
43
+
44
+ # CA1027: Mark enums with FlagsAttribute
45
+ dotnet_diagnostic.CA1027.severity = warning
46
+
47
+ # CA1028: Enum Storage should be Int32
48
+ dotnet_diagnostic.CA1028.severity = warning
49
+
50
+ # CA1030: Use events where appropriate
51
+ dotnet_diagnostic.CA1030.severity = warning
52
+
53
+ # CA1031: Do not catch general exception types
54
+ dotnet_diagnostic.CA1031.severity = warning
55
+
56
+ # CA1032: Implement standard exception constructors
57
+ dotnet_diagnostic.CA1032.severity = warning
58
+
59
+ # CA1033: Interface methods should be callable by child types
60
+ dotnet_diagnostic.CA1033.severity = warning
61
+
62
+ # CA1034: Nested types should not be visible
63
+ dotnet_diagnostic.CA1034.severity = warning
64
+
65
+ # CA1036: Override methods on comparable types
66
+ dotnet_diagnostic.CA1036.severity = warning
67
+
68
+ # CA1040: Avoid empty interfaces
69
+ dotnet_diagnostic.CA1040.severity = warning
70
+
71
+ # CA1041: Provide ObsoleteAttribute message
72
+ dotnet_diagnostic.CA1041.severity = warning
73
+
74
+ # CA1043: Use Integral Or String Argument For Indexers
75
+ dotnet_diagnostic.CA1043.severity = warning
76
+
77
+ # CA1044: Properties should not be write only
78
+ dotnet_diagnostic.CA1044.severity = warning
79
+
80
+ # CA1046: Do not overload equality operator on reference types
81
+ dotnet_diagnostic.CA1046.severity = warning
82
+
83
+ # CA1047: Do not declare protected member in sealed type
84
+ dotnet_diagnostic.CA1047.severity = warning
85
+
86
+ # CA1050: Declare types in namespaces
87
+ dotnet_diagnostic.CA1050.severity = warning
88
+
89
+ # CA1051: Do not declare visible instance fields
90
+ dotnet_diagnostic.CA1051.severity = warning
91
+
92
+ # CA1052: Static holder types should be Static or NotInheritable
93
+ dotnet_diagnostic.CA1052.severity = warning
94
+
95
+ # CA1054: URI-like parameters should not be strings
96
+ dotnet_diagnostic.CA1054.severity = warning
97
+
98
+ # CA1055: URI-like return values should not be strings
99
+ dotnet_diagnostic.CA1055.severity = warning
100
+
101
+ # CA1056: URI-like properties should not be strings
102
+ dotnet_diagnostic.CA1056.severity = warning
103
+
104
+ # CA1058: Types should not extend certain base types
105
+ dotnet_diagnostic.CA1058.severity = warning
106
+
107
+ # CA1061: Do not hide base class methods
108
+ dotnet_diagnostic.CA1061.severity = warning
109
+
110
+ # CA1062: Validate arguments of public methods
111
+ dotnet_diagnostic.CA1062.severity = warning
112
+
113
+ # CA1063: Implement IDisposable Correctly
114
+ dotnet_diagnostic.CA1063.severity = warning
115
+
116
+ # CA1064: Exceptions should be public
117
+ dotnet_diagnostic.CA1064.severity = warning
118
+
119
+ # CA1065: Do not raise exceptions in unexpected locations
120
+ dotnet_diagnostic.CA1065.severity = warning
121
+
122
+ # CA1066: Implement IEquatable when overriding Object.Equals
123
+ dotnet_diagnostic.CA1066.severity = warning
124
+
125
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
126
+ dotnet_diagnostic.CA1067.severity = warning
127
+
128
+ # CA1068: CancellationToken parameters must come last
129
+ dotnet_diagnostic.CA1068.severity = warning
130
+
131
+ # CA1069: Enums values should not be duplicated
132
+ dotnet_diagnostic.CA1069.severity = warning
133
+
134
+ # CA1070: Do not declare event fields as virtual
135
+ dotnet_diagnostic.CA1070.severity = warning
136
+
137
+ # CA1200: Avoid using cref tags with a prefix
138
+ dotnet_diagnostic.CA1200.severity = warning
139
+
140
+ # CA1303: Do not pass literals as localized parameters
141
+ dotnet_diagnostic.CA1303.severity = warning
142
+
143
+ # CA1304: Specify CultureInfo
144
+ dotnet_diagnostic.CA1304.severity = warning
145
+
146
+ # CA1305: Specify IFormatProvider
147
+ dotnet_diagnostic.CA1305.severity = warning
148
+
149
+ # CA1307: Specify StringComparison for clarity
150
+ dotnet_diagnostic.CA1307.severity = warning
151
+
152
+ # CA1308: Normalize strings to uppercase
153
+ dotnet_diagnostic.CA1308.severity = warning
154
+
155
+ # CA1309: Use ordinal string comparison
156
+ dotnet_diagnostic.CA1309.severity = warning
157
+
158
+ # CA1310: Specify StringComparison for correctness
159
+ dotnet_diagnostic.CA1310.severity = warning
160
+
161
+ # CA1311: Specify a culture or use an invariant version
162
+ dotnet_diagnostic.CA1311.severity = warning
163
+
164
+ # CA1401: P/Invokes should not be visible
165
+ dotnet_diagnostic.CA1401.severity = warning
166
+
167
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
168
+ dotnet_diagnostic.CA1419.severity = warning
169
+
170
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
171
+ dotnet_diagnostic.CA1421.severity = warning
172
+
173
+ # CA1507: Use nameof to express symbol names
174
+ dotnet_diagnostic.CA1507.severity = warning
175
+
176
+ # CA1508: Avoid dead conditional code
177
+ dotnet_diagnostic.CA1508.severity = warning
178
+
179
+ # CA1510: Use ArgumentNullException throw helper
180
+ dotnet_diagnostic.CA1510.severity = warning
181
+
182
+ # CA1511: Use ArgumentException throw helper
183
+ dotnet_diagnostic.CA1511.severity = warning
184
+
185
+ # CA1512: Use ArgumentOutOfRangeException throw helper
186
+ dotnet_diagnostic.CA1512.severity = warning
187
+
188
+ # CA1513: Use ObjectDisposedException throw helper
189
+ dotnet_diagnostic.CA1513.severity = warning
190
+
191
+ # CA1514: Avoid redundant length argument
192
+ dotnet_diagnostic.CA1514.severity = warning
193
+
194
+ # CA1515: Consider making public types internal
195
+ dotnet_diagnostic.CA1515.severity = warning
196
+
197
+ # CA1700: Do not name enum values 'Reserved'
198
+ dotnet_diagnostic.CA1700.severity = warning
199
+
200
+ # CA1707: Identifiers should not contain underscores
201
+ dotnet_diagnostic.CA1707.severity = warning
202
+
203
+ # CA1708: Identifiers should differ by more than case
204
+ dotnet_diagnostic.CA1708.severity = warning
205
+
206
+ # CA1710: Identifiers should have correct suffix
207
+ dotnet_diagnostic.CA1710.severity = warning
208
+
209
+ # CA1711: Identifiers should not have incorrect suffix
210
+ dotnet_diagnostic.CA1711.severity = warning
211
+
212
+ # CA1712: Do not prefix enum values with type name
213
+ dotnet_diagnostic.CA1712.severity = warning
214
+
215
+ # CA1713: Events should not have 'Before' or 'After' prefix
216
+ dotnet_diagnostic.CA1713.severity = warning
217
+
218
+ # CA1715: Identifiers should have correct prefix
219
+ dotnet_diagnostic.CA1715.severity = warning
220
+
221
+ # CA1716: Identifiers should not match keywords
222
+ dotnet_diagnostic.CA1716.severity = warning
223
+
224
+ # CA1720: Identifier contains type name
225
+ dotnet_diagnostic.CA1720.severity = warning
226
+
227
+ # CA1721: Property names should not match get methods
228
+ dotnet_diagnostic.CA1721.severity = warning
229
+
230
+ # CA1724: Type names should not match namespaces
231
+ dotnet_diagnostic.CA1724.severity = warning
232
+
233
+ # CA1725: Parameter names should match base declaration
234
+ dotnet_diagnostic.CA1725.severity = warning
235
+
236
+ # CA1727: Use PascalCase for named placeholders
237
+ dotnet_diagnostic.CA1727.severity = warning
238
+
239
+ # CA1802: Use literals where appropriate
240
+ dotnet_diagnostic.CA1802.severity = warning
241
+
242
+ # CA1805: Do not initialize unnecessarily
243
+ dotnet_diagnostic.CA1805.severity = warning
244
+
245
+ # CA1806: Do not ignore method results
246
+ dotnet_diagnostic.CA1806.severity = warning
247
+
248
+ # CA1810: Initialize reference type static fields inline
249
+ dotnet_diagnostic.CA1810.severity = warning
250
+
251
+ # CA1812: Avoid uninstantiated internal classes
252
+ dotnet_diagnostic.CA1812.severity = warning
253
+
254
+ # CA1813: Avoid unsealed attributes
255
+ dotnet_diagnostic.CA1813.severity = warning
256
+
257
+ # CA1814: Prefer jagged arrays over multidimensional
258
+ dotnet_diagnostic.CA1814.severity = warning
259
+
260
+ # CA1815: Override equals and operator equals on value types
261
+ dotnet_diagnostic.CA1815.severity = warning
262
+
263
+ # CA1816: Dispose methods should call SuppressFinalize
264
+ dotnet_diagnostic.CA1816.severity = warning
265
+
266
+ # CA1819: Properties should not return arrays
267
+ dotnet_diagnostic.CA1819.severity = warning
268
+
269
+ # CA1820: Test for empty strings using string length
270
+ dotnet_diagnostic.CA1820.severity = warning
271
+
272
+ # CA1821: Remove empty Finalizers
273
+ dotnet_diagnostic.CA1821.severity = warning
274
+
275
+ # CA1822: Mark members as static
276
+ dotnet_diagnostic.CA1822.severity = warning
277
+
278
+ # CA1823: Avoid unused private fields
279
+ dotnet_diagnostic.CA1823.severity = warning
280
+
281
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
282
+ dotnet_diagnostic.CA1824.severity = warning
283
+
284
+ # CA1825: Avoid zero-length array allocations
285
+ dotnet_diagnostic.CA1825.severity = warning
286
+
287
+ # CA1826: Do not use Enumerable methods on indexable collections
288
+ dotnet_diagnostic.CA1826.severity = warning
289
+
290
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
291
+ dotnet_diagnostic.CA1827.severity = warning
292
+
293
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
294
+ dotnet_diagnostic.CA1828.severity = warning
295
+
296
+ # CA1829: Use Length/Count property instead of Count() when available
297
+ dotnet_diagnostic.CA1829.severity = warning
298
+
299
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
300
+ dotnet_diagnostic.CA1830.severity = warning
301
+
302
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
303
+ dotnet_diagnostic.CA1832.severity = warning
304
+
305
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
306
+ dotnet_diagnostic.CA1833.severity = warning
307
+
308
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
309
+ dotnet_diagnostic.CA1834.severity = warning
310
+
311
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
312
+ dotnet_diagnostic.CA1835.severity = warning
313
+
314
+ # CA1836: Prefer IsEmpty over Count
315
+ dotnet_diagnostic.CA1836.severity = warning
316
+
317
+ # CA1837: Use 'Environment.ProcessId'
318
+ dotnet_diagnostic.CA1837.severity = warning
319
+
320
+ # CA1838: Avoid 'StringBuilder' parameters for P/Invokes
321
+ dotnet_diagnostic.CA1838.severity = warning
322
+
323
+ # CA1839: Use 'Environment.ProcessPath'
324
+ dotnet_diagnostic.CA1839.severity = warning
325
+
326
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
327
+ dotnet_diagnostic.CA1840.severity = warning
328
+
329
+ # CA1841: Prefer Dictionary.Contains methods
330
+ dotnet_diagnostic.CA1841.severity = warning
331
+
332
+ # CA1842: Do not use 'WhenAll' with a single task
333
+ dotnet_diagnostic.CA1842.severity = warning
334
+
335
+ # CA1843: Do not use 'WaitAll' with a single task
336
+ dotnet_diagnostic.CA1843.severity = warning
337
+
338
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
339
+ dotnet_diagnostic.CA1844.severity = warning
340
+
341
+ # CA1845: Use span-based 'string.Concat'
342
+ dotnet_diagnostic.CA1845.severity = warning
343
+
344
+ # CA1846: Prefer 'AsSpan' over 'Substring'
345
+ dotnet_diagnostic.CA1846.severity = warning
346
+
347
+ # CA1847: Use char literal for a single character lookup
348
+ dotnet_diagnostic.CA1847.severity = warning
349
+
350
+ # CA1848: Use the LoggerMessage delegates
351
+ dotnet_diagnostic.CA1848.severity = warning
352
+
353
+ # CA1849: Call async methods when in an async method
354
+ dotnet_diagnostic.CA1849.severity = warning
355
+
356
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
357
+ dotnet_diagnostic.CA1850.severity = warning
358
+
359
+ # CA1851: Possible multiple enumerations of 'IEnumerable' collection
360
+ dotnet_diagnostic.CA1851.severity = warning
361
+
362
+ # CA1852: Seal internal types
363
+ dotnet_diagnostic.CA1852.severity = warning
364
+
365
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
366
+ dotnet_diagnostic.CA1853.severity = warning
367
+
368
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
369
+ dotnet_diagnostic.CA1854.severity = warning
370
+
371
+ # CA1855: Prefer 'Clear' over 'Fill'
372
+ dotnet_diagnostic.CA1855.severity = warning
373
+
374
+ # CA1856: Incorrect usage of ConstantExpected attribute
375
+ dotnet_diagnostic.CA1856.severity = warning
376
+
377
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
378
+ dotnet_diagnostic.CA1858.severity = warning
379
+
380
+ # CA1859: Use concrete types when possible for improved performance
381
+ dotnet_diagnostic.CA1859.severity = warning
382
+
383
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
384
+ dotnet_diagnostic.CA1860.severity = warning
385
+
386
+ # CA1861: Avoid constant arrays as arguments
387
+ dotnet_diagnostic.CA1861.severity = warning
388
+
389
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
390
+ dotnet_diagnostic.CA1862.severity = warning
391
+
392
+ # CA1863: Use 'CompositeFormat'
393
+ dotnet_diagnostic.CA1863.severity = warning
394
+
395
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
396
+ dotnet_diagnostic.CA1864.severity = warning
397
+
398
+ # CA1865: Use char overload
399
+ dotnet_diagnostic.CA1865.severity = warning
400
+
401
+ # CA1866: Use char overload
402
+ dotnet_diagnostic.CA1866.severity = warning
403
+
404
+ # CA1867: Use char overload
405
+ dotnet_diagnostic.CA1867.severity = warning
406
+
407
+ # CA1868: Unnecessary call to 'Contains(item)'
408
+ dotnet_diagnostic.CA1868.severity = warning
409
+
410
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
411
+ dotnet_diagnostic.CA1869.severity = warning
412
+
413
+ # CA1870: Use a cached 'SearchValues' instance
414
+ dotnet_diagnostic.CA1870.severity = warning
415
+
416
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
417
+ dotnet_diagnostic.CA1871.severity = warning
418
+
419
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
420
+ dotnet_diagnostic.CA1872.severity = warning
421
+
422
+ # CA2000: Dispose objects before losing scope
423
+ dotnet_diagnostic.CA2000.severity = warning
424
+
425
+ # CA2002: Do not lock on objects with weak identity
426
+ dotnet_diagnostic.CA2002.severity = warning
427
+
428
+ # CA2007: Consider calling ConfigureAwait on the awaited task
429
+ dotnet_diagnostic.CA2007.severity = warning
430
+
431
+ # CA2008: Do not create tasks without passing a TaskScheduler
432
+ dotnet_diagnostic.CA2008.severity = warning
433
+
434
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
435
+ dotnet_diagnostic.CA2009.severity = warning
436
+
437
+ # CA2011: Avoid infinite recursion
438
+ dotnet_diagnostic.CA2011.severity = warning
439
+
440
+ # CA2012: Use ValueTasks correctly
441
+ dotnet_diagnostic.CA2012.severity = warning
442
+
443
+ # CA2016: Forward the 'CancellationToken' parameter to methods
444
+ dotnet_diagnostic.CA2016.severity = warning
445
+
446
+ # CA2019: Improper 'ThreadStatic' field initialization
447
+ dotnet_diagnostic.CA2019.severity = warning
448
+
449
+ # CA2020: Prevent behavioral change
450
+ dotnet_diagnostic.CA2020.severity = warning
451
+
452
+ # CA2100: Review SQL queries for security vulnerabilities
453
+ dotnet_diagnostic.CA2100.severity = warning
454
+
455
+ # CA2101: Specify marshaling for P/Invoke string arguments
456
+ dotnet_diagnostic.CA2101.severity = warning
457
+
458
+ # CA2119: Seal methods that satisfy private interfaces
459
+ dotnet_diagnostic.CA2119.severity = warning
460
+
461
+ # CA2153: Do Not Catch Corrupted State Exceptions
462
+ dotnet_diagnostic.CA2153.severity = warning
463
+
464
+ # CA2201: Do not raise reserved exception types
465
+ dotnet_diagnostic.CA2201.severity = warning
466
+
467
+ # CA2207: Initialize value type static fields inline
468
+ dotnet_diagnostic.CA2207.severity = warning
469
+
470
+ # CA2208: Instantiate argument exceptions correctly
471
+ dotnet_diagnostic.CA2208.severity = warning
472
+
473
+ # CA2211: Non-constant fields should not be visible
474
+ dotnet_diagnostic.CA2211.severity = warning
475
+
476
+ # CA2213: Disposable fields should be disposed
477
+ dotnet_diagnostic.CA2213.severity = warning
478
+
479
+ # CA2214: Do not call overridable methods in constructors
480
+ dotnet_diagnostic.CA2214.severity = warning
481
+
482
+ # CA2215: Dispose methods should call base class dispose
483
+ dotnet_diagnostic.CA2215.severity = warning
484
+
485
+ # CA2216: Disposable types should declare finalizer
486
+ dotnet_diagnostic.CA2216.severity = warning
487
+
488
+ # CA2217: Do not mark enums with FlagsAttribute
489
+ dotnet_diagnostic.CA2217.severity = warning
490
+
491
+ # CA2218: Override GetHashCode on overriding Equals
492
+ dotnet_diagnostic.CA2218.severity = warning
493
+
494
+ # CA2219: Do not raise exceptions in finally clauses
495
+ dotnet_diagnostic.CA2219.severity = warning
496
+
497
+ # CA2224: Override Equals on overloading operator equals
498
+ dotnet_diagnostic.CA2224.severity = warning
499
+
500
+ # CA2225: Operator overloads have named alternates
501
+ dotnet_diagnostic.CA2225.severity = warning
502
+
503
+ # CA2226: Operators should have symmetrical overloads
504
+ dotnet_diagnostic.CA2226.severity = warning
505
+
506
+ # CA2227: Collection properties should be read only
507
+ dotnet_diagnostic.CA2227.severity = warning
508
+
509
+ # CA2231: Overload operator equals on overriding value type Equals
510
+ dotnet_diagnostic.CA2231.severity = warning
511
+
512
+ # CA2234: Pass system uri objects instead of strings
513
+ dotnet_diagnostic.CA2234.severity = warning
514
+
515
+ # CA2235: Mark all non-serializable fields
516
+ dotnet_diagnostic.CA2235.severity = warning
517
+
518
+ # CA2237: Mark ISerializable types with serializable
519
+ dotnet_diagnostic.CA2237.severity = warning
520
+
521
+ # CA2241: Provide correct arguments to formatting methods
522
+ dotnet_diagnostic.CA2241.severity = warning
523
+
524
+ # CA2242: Test for NaN correctly
525
+ dotnet_diagnostic.CA2242.severity = warning
526
+
527
+ # CA2243: Attribute string literals should parse correctly
528
+ dotnet_diagnostic.CA2243.severity = warning
529
+
530
+ # CA2244: Do not duplicate indexed element initializations
531
+ dotnet_diagnostic.CA2244.severity = warning
532
+
533
+ # CA2245: Do not assign a property to itself
534
+ dotnet_diagnostic.CA2245.severity = warning
535
+
536
+ # CA2246: Assigning symbol and its member in the same statement
537
+ dotnet_diagnostic.CA2246.severity = warning
538
+
539
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
540
+ dotnet_diagnostic.CA2248.severity = warning
541
+
542
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
543
+ dotnet_diagnostic.CA2249.severity = warning
544
+
545
+ # CA2250: Use 'ThrowIfCancellationRequested'
546
+ dotnet_diagnostic.CA2250.severity = warning
547
+
548
+ # CA2251: Use 'string.Equals'
549
+ dotnet_diagnostic.CA2251.severity = warning
550
+
551
+ # CA2252: This API requires opting into preview features
552
+ dotnet_diagnostic.CA2252.severity = warning
553
+
554
+ # CA2253: Named placeholders should not be numeric values
555
+ dotnet_diagnostic.CA2253.severity = warning
556
+
557
+ # CA2254: Template should be a static expression
558
+ dotnet_diagnostic.CA2254.severity = warning
559
+
560
+ # CA2262: Set 'MaxResponseHeadersLength' properly
561
+ dotnet_diagnostic.CA2262.severity = warning
562
+
563
+ # CA2263: Prefer generic overload when type is known
564
+ dotnet_diagnostic.CA2263.severity = warning
565
+
566
+ # CA2300: Do not use insecure deserializer BinaryFormatter
567
+ dotnet_diagnostic.CA2300.severity = warning
568
+
569
+ # CA2301: Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder
570
+ dotnet_diagnostic.CA2301.severity = warning
571
+
572
+ # CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize
573
+ dotnet_diagnostic.CA2302.severity = warning
574
+
575
+ # CA2305: Do not use insecure deserializer LosFormatter
576
+ dotnet_diagnostic.CA2305.severity = warning
577
+
578
+ # CA2310: Do not use insecure deserializer NetDataContractSerializer
579
+ dotnet_diagnostic.CA2310.severity = warning
580
+
581
+ # CA2311: Do not deserialize without first setting NetDataContractSerializer.Binder
582
+ dotnet_diagnostic.CA2311.severity = warning
583
+
584
+ # CA2312: Ensure NetDataContractSerializer.Binder is set before deserializing
585
+ dotnet_diagnostic.CA2312.severity = warning
586
+
587
+ # CA2315: Do not use insecure deserializer ObjectStateFormatter
588
+ dotnet_diagnostic.CA2315.severity = warning
589
+
590
+ # CA2321: Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver
591
+ dotnet_diagnostic.CA2321.severity = warning
592
+
593
+ # CA2322: Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing
594
+ dotnet_diagnostic.CA2322.severity = warning
595
+
596
+ # CA2326: Do not use TypeNameHandling values other than None
597
+ dotnet_diagnostic.CA2326.severity = warning
598
+
599
+ # CA2327: Do not use insecure JsonSerializerSettings
600
+ dotnet_diagnostic.CA2327.severity = warning
601
+
602
+ # CA2328: Ensure that JsonSerializerSettings are secure
603
+ dotnet_diagnostic.CA2328.severity = warning
604
+
605
+ # CA2329: Do not deserialize with JsonSerializer using an insecure configuration
606
+ dotnet_diagnostic.CA2329.severity = warning
607
+
608
+ # CA2330: Ensure that JsonSerializer has a secure configuration when deserializing
609
+ dotnet_diagnostic.CA2330.severity = warning
610
+
611
+ # CA2350: Do not use DataTable.ReadXml() with untrusted data
612
+ dotnet_diagnostic.CA2350.severity = warning
613
+
614
+ # CA2351: Do not use DataSet.ReadXml() with untrusted data
615
+ dotnet_diagnostic.CA2351.severity = warning
616
+
617
+ # CA2352: Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks
618
+ dotnet_diagnostic.CA2352.severity = warning
619
+
620
+ # CA2353: Unsafe DataSet or DataTable in serializable type
621
+ dotnet_diagnostic.CA2353.severity = warning
622
+
623
+ # CA2354: Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks
624
+ dotnet_diagnostic.CA2354.severity = warning
625
+
626
+ # CA2355: Unsafe DataSet or DataTable type found in deserializable object graph
627
+ dotnet_diagnostic.CA2355.severity = warning
628
+
629
+ # CA2356: Unsafe DataSet or DataTable type in web deserializable object graph
630
+ dotnet_diagnostic.CA2356.severity = warning
631
+
632
+ # CA2361: Ensure auto-generated class containing DataSet.ReadXml() is not used with untrusted data
633
+ dotnet_diagnostic.CA2361.severity = warning
634
+
635
+ # CA2362: Unsafe DataSet or DataTable in auto-generated serializable type can be vulnerable to remote code execution attacks
636
+ dotnet_diagnostic.CA2362.severity = warning
637
+
638
+ # CA3001: Review code for SQL injection vulnerabilities
639
+ dotnet_diagnostic.CA3001.severity = warning
640
+
641
+ # CA3002: Review code for XSS vulnerabilities
642
+ dotnet_diagnostic.CA3002.severity = warning
643
+
644
+ # CA3003: Review code for file path injection vulnerabilities
645
+ dotnet_diagnostic.CA3003.severity = warning
646
+
647
+ # CA3004: Review code for information disclosure vulnerabilities
648
+ dotnet_diagnostic.CA3004.severity = warning
649
+
650
+ # CA3005: Review code for LDAP injection vulnerabilities
651
+ dotnet_diagnostic.CA3005.severity = warning
652
+
653
+ # CA3006: Review code for process command injection vulnerabilities
654
+ dotnet_diagnostic.CA3006.severity = warning
655
+
656
+ # CA3007: Review code for open redirect vulnerabilities
657
+ dotnet_diagnostic.CA3007.severity = warning
658
+
659
+ # CA3008: Review code for XPath injection vulnerabilities
660
+ dotnet_diagnostic.CA3008.severity = warning
661
+
662
+ # CA3009: Review code for XML injection vulnerabilities
663
+ dotnet_diagnostic.CA3009.severity = warning
664
+
665
+ # CA3010: Review code for XAML injection vulnerabilities
666
+ dotnet_diagnostic.CA3010.severity = warning
667
+
668
+ # CA3011: Review code for DLL injection vulnerabilities
669
+ dotnet_diagnostic.CA3011.severity = warning
670
+
671
+ # CA3012: Review code for regex injection vulnerabilities
672
+ dotnet_diagnostic.CA3012.severity = warning
673
+
674
+ # CA3061: Do Not Add Schema By URL
675
+ dotnet_diagnostic.CA3061.severity = warning
676
+
677
+ # CA3075: Insecure DTD processing in XML
678
+ dotnet_diagnostic.CA3075.severity = warning
679
+
680
+ # CA3076: Insecure XSLT script processing
681
+ dotnet_diagnostic.CA3076.severity = warning
682
+
683
+ # CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader
684
+ dotnet_diagnostic.CA3077.severity = warning
685
+
686
+ # CA3147: Mark Verb Handlers With Validate Antiforgery Token
687
+ dotnet_diagnostic.CA3147.severity = warning
688
+
689
+ # CA5350: Do Not Use Weak Cryptographic Algorithms
690
+ dotnet_diagnostic.CA5350.severity = warning
691
+
692
+ # CA5351: Do Not Use Broken Cryptographic Algorithms
693
+ dotnet_diagnostic.CA5351.severity = warning
694
+
695
+ # CA5358: Review cipher mode usage with cryptography experts
696
+ dotnet_diagnostic.CA5358.severity = warning
697
+
698
+ # CA5359: Do Not Disable Certificate Validation
699
+ dotnet_diagnostic.CA5359.severity = warning
700
+
701
+ # CA5360: Do Not Call Dangerous Methods In Deserialization
702
+ dotnet_diagnostic.CA5360.severity = warning
703
+
704
+ # CA5361: Do Not Disable SChannel Use of Strong Crypto
705
+ dotnet_diagnostic.CA5361.severity = warning
706
+
707
+ # CA5362: Potential reference cycle in deserialized object graph
708
+ dotnet_diagnostic.CA5362.severity = warning
709
+
710
+ # CA5363: Do Not Disable Request Validation
711
+ dotnet_diagnostic.CA5363.severity = warning
712
+
713
+ # CA5364: Do Not Use Deprecated Security Protocols
714
+ dotnet_diagnostic.CA5364.severity = warning
715
+
716
+ # CA5365: Do Not Disable HTTP Header Checking
717
+ dotnet_diagnostic.CA5365.severity = warning
718
+
719
+ # CA5366: Use XmlReader for 'DataSet.ReadXml()'
720
+ dotnet_diagnostic.CA5366.severity = warning
721
+
722
+ # CA5367: Do Not Serialize Types With Pointer Fields
723
+ dotnet_diagnostic.CA5367.severity = warning
724
+
725
+ # CA5368: Set ViewStateUserKey For Classes Derived From Page
726
+ dotnet_diagnostic.CA5368.severity = warning
727
+
728
+ # CA5369: Use XmlReader for 'XmlSerializer.Deserialize()'
729
+ dotnet_diagnostic.CA5369.severity = warning
730
+
731
+ # CA5370: Use XmlReader for XmlValidatingReader constructor
732
+ dotnet_diagnostic.CA5370.severity = warning
733
+
734
+ # CA5371: Use XmlReader for 'XmlSchema.Read()'
735
+ dotnet_diagnostic.CA5371.severity = warning
736
+
737
+ # CA5372: Use XmlReader for XPathDocument constructor
738
+ dotnet_diagnostic.CA5372.severity = warning
739
+
740
+ # CA5373: Do not use obsolete key derivation function
741
+ dotnet_diagnostic.CA5373.severity = warning
742
+
743
+ # CA5374: Do Not Use XslTransform
744
+ dotnet_diagnostic.CA5374.severity = warning
745
+
746
+ # CA5375: Do Not Use Account Shared Access Signature
747
+ dotnet_diagnostic.CA5375.severity = warning
748
+
749
+ # CA5376: Use SharedAccessProtocol HttpsOnly
750
+ dotnet_diagnostic.CA5376.severity = warning
751
+
752
+ # CA5377: Use Container Level Access Policy
753
+ dotnet_diagnostic.CA5377.severity = warning
754
+
755
+ # CA5378: Do not disable ServicePointManagerSecurityProtocols
756
+ dotnet_diagnostic.CA5378.severity = warning
757
+
758
+ # CA5379: Ensure Key Derivation Function algorithm is sufficiently strong
759
+ dotnet_diagnostic.CA5379.severity = warning
760
+
761
+ # CA5380: Do Not Add Certificates To Root Store
762
+ dotnet_diagnostic.CA5380.severity = warning
763
+
764
+ # CA5381: Ensure Certificates Are Not Added To Root Store
765
+ dotnet_diagnostic.CA5381.severity = warning
766
+
767
+ # CA5382: Use Secure Cookies In ASP.NET Core
768
+ dotnet_diagnostic.CA5382.severity = warning
769
+
770
+ # CA5383: Ensure Use Secure Cookies In ASP.NET Core
771
+ dotnet_diagnostic.CA5383.severity = warning
772
+
773
+ # CA5384: Do Not Use Digital Signature Algorithm (DSA)
774
+ dotnet_diagnostic.CA5384.severity = warning
775
+
776
+ # CA5385: Use Rivest-Shamir-Adleman (RSA) Algorithm With Sufficient Key Size
777
+ dotnet_diagnostic.CA5385.severity = warning
778
+
779
+ # CA5386: Avoid hardcoding SecurityProtocolType value
780
+ dotnet_diagnostic.CA5386.severity = warning
781
+
782
+ # CA5387: Do Not Use Weak Key Derivation Function With Insufficient Iteration Count
783
+ dotnet_diagnostic.CA5387.severity = warning
784
+
785
+ # CA5388: Ensure Sufficient Iteration Count When Using Weak Key Derivation Function
786
+ dotnet_diagnostic.CA5388.severity = warning
787
+
788
+ # CA5389: Do Not Add Archive Item's Path To The Target File System Path
789
+ dotnet_diagnostic.CA5389.severity = warning
790
+
791
+ # CA5390: Do not hard-code encryption key
792
+ dotnet_diagnostic.CA5390.severity = warning
793
+
794
+ # CA5391: Use antiforgery tokens in ASP.NET Core MVC controllers
795
+ dotnet_diagnostic.CA5391.severity = warning
796
+
797
+ # CA5392: Use DefaultDllImportSearchPaths attribute for P/Invokes
798
+ dotnet_diagnostic.CA5392.severity = warning
799
+
800
+ # CA5393: Do not use unsafe DllImportSearchPath value
801
+ dotnet_diagnostic.CA5393.severity = warning
802
+
803
+ # CA5394: Do not use insecure randomness
804
+ dotnet_diagnostic.CA5394.severity = warning
805
+
806
+ # CA5395: Miss HttpVerb attribute for action methods
807
+ dotnet_diagnostic.CA5395.severity = warning
808
+
809
+ # CA5396: Set HttpOnly to true for HttpCookie
810
+ dotnet_diagnostic.CA5396.severity = warning
811
+
812
+ # CA5397: Do not use deprecated SslProtocols values
813
+ dotnet_diagnostic.CA5397.severity = warning
814
+
815
+ # CA5398: Avoid hardcoded SslProtocols values
816
+ dotnet_diagnostic.CA5398.severity = warning
817
+
818
+ # CA5399: HttpClients should enable certificate revocation list checks
819
+ dotnet_diagnostic.CA5399.severity = warning
820
+
821
+ # CA5400: Ensure HttpClient certificate revocation list check is not disabled
822
+ dotnet_diagnostic.CA5400.severity = warning
823
+
824
+ # CA5401: Do not use CreateEncryptor with non-default IV
825
+ dotnet_diagnostic.CA5401.severity = warning
826
+
827
+ # CA5402: Use CreateEncryptor with the default IV
828
+ dotnet_diagnostic.CA5402.severity = warning
829
+
830
+ # CA5403: Do not hard-code certificate
831
+ dotnet_diagnostic.CA5403.severity = warning
832
+
833
+ # CA5404: Do not disable token validation checks
834
+ dotnet_diagnostic.CA5404.severity = warning
835
+
836
+ # CA5405: Do not always skip token validation in delegates
837
+ dotnet_diagnostic.CA5405.severity = warning
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_all_warnaserror.globalconfig ADDED
@@ -0,0 +1,906 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'All' analysis mode escalated to 'error' severity
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'All' analysis mode. Rules that are first released in a version later than '10.0' are disabled. Enabled rules with 'warning' severity are escalated to 'error' severity to respect 'CodeAnalysisTreatWarningsAsErrors' MSBuild property.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1000: Do not declare static members on generic types
12
+ dotnet_diagnostic.CA1000.severity = error
13
+
14
+ # CA1001: Types that own disposable fields should be disposable
15
+ dotnet_diagnostic.CA1001.severity = error
16
+
17
+ # CA1002: Do not expose generic lists
18
+ dotnet_diagnostic.CA1002.severity = error
19
+
20
+ # CA1003: Use generic event handler instances
21
+ dotnet_diagnostic.CA1003.severity = error
22
+
23
+ # CA1008: Enums should have zero value
24
+ dotnet_diagnostic.CA1008.severity = error
25
+
26
+ # CA1010: Generic interface should also be implemented
27
+ dotnet_diagnostic.CA1010.severity = error
28
+
29
+ # CA1012: Abstract types should not have public constructors
30
+ dotnet_diagnostic.CA1012.severity = error
31
+
32
+ # CA1016: Mark assemblies with assembly version
33
+ dotnet_diagnostic.CA1016.severity = error
34
+
35
+ # CA1018: Mark attributes with AttributeUsageAttribute
36
+ dotnet_diagnostic.CA1018.severity = error
37
+
38
+ # CA1019: Define accessors for attribute arguments
39
+ dotnet_diagnostic.CA1019.severity = error
40
+
41
+ # CA1024: Use properties where appropriate
42
+ dotnet_diagnostic.CA1024.severity = error
43
+
44
+ # CA1027: Mark enums with FlagsAttribute
45
+ dotnet_diagnostic.CA1027.severity = error
46
+
47
+ # CA1028: Enum Storage should be Int32
48
+ dotnet_diagnostic.CA1028.severity = error
49
+
50
+ # CA1030: Use events where appropriate
51
+ dotnet_diagnostic.CA1030.severity = error
52
+
53
+ # CA1031: Do not catch general exception types
54
+ dotnet_diagnostic.CA1031.severity = error
55
+
56
+ # CA1032: Implement standard exception constructors
57
+ dotnet_diagnostic.CA1032.severity = error
58
+
59
+ # CA1033: Interface methods should be callable by child types
60
+ dotnet_diagnostic.CA1033.severity = error
61
+
62
+ # CA1034: Nested types should not be visible
63
+ dotnet_diagnostic.CA1034.severity = error
64
+
65
+ # CA1036: Override methods on comparable types
66
+ dotnet_diagnostic.CA1036.severity = error
67
+
68
+ # CA1040: Avoid empty interfaces
69
+ dotnet_diagnostic.CA1040.severity = error
70
+
71
+ # CA1041: Provide ObsoleteAttribute message
72
+ dotnet_diagnostic.CA1041.severity = error
73
+
74
+ # CA1043: Use Integral Or String Argument For Indexers
75
+ dotnet_diagnostic.CA1043.severity = error
76
+
77
+ # CA1044: Properties should not be write only
78
+ dotnet_diagnostic.CA1044.severity = error
79
+
80
+ # CA1046: Do not overload equality operator on reference types
81
+ dotnet_diagnostic.CA1046.severity = error
82
+
83
+ # CA1047: Do not declare protected member in sealed type
84
+ dotnet_diagnostic.CA1047.severity = error
85
+
86
+ # CA1050: Declare types in namespaces
87
+ dotnet_diagnostic.CA1050.severity = error
88
+
89
+ # CA1051: Do not declare visible instance fields
90
+ dotnet_diagnostic.CA1051.severity = error
91
+
92
+ # CA1052: Static holder types should be Static or NotInheritable
93
+ dotnet_diagnostic.CA1052.severity = error
94
+
95
+ # CA1054: URI-like parameters should not be strings
96
+ dotnet_diagnostic.CA1054.severity = error
97
+
98
+ # CA1055: URI-like return values should not be strings
99
+ dotnet_diagnostic.CA1055.severity = error
100
+
101
+ # CA1056: URI-like properties should not be strings
102
+ dotnet_diagnostic.CA1056.severity = error
103
+
104
+ # CA1058: Types should not extend certain base types
105
+ dotnet_diagnostic.CA1058.severity = error
106
+
107
+ # CA1061: Do not hide base class methods
108
+ dotnet_diagnostic.CA1061.severity = error
109
+
110
+ # CA1062: Validate arguments of public methods
111
+ dotnet_diagnostic.CA1062.severity = error
112
+
113
+ # CA1063: Implement IDisposable Correctly
114
+ dotnet_diagnostic.CA1063.severity = error
115
+
116
+ # CA1064: Exceptions should be public
117
+ dotnet_diagnostic.CA1064.severity = error
118
+
119
+ # CA1065: Do not raise exceptions in unexpected locations
120
+ dotnet_diagnostic.CA1065.severity = error
121
+
122
+ # CA1066: Implement IEquatable when overriding Object.Equals
123
+ dotnet_diagnostic.CA1066.severity = error
124
+
125
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
126
+ dotnet_diagnostic.CA1067.severity = error
127
+
128
+ # CA1068: CancellationToken parameters must come last
129
+ dotnet_diagnostic.CA1068.severity = error
130
+
131
+ # CA1069: Enums values should not be duplicated
132
+ dotnet_diagnostic.CA1069.severity = error
133
+
134
+ # CA1070: Do not declare event fields as virtual
135
+ dotnet_diagnostic.CA1070.severity = error
136
+
137
+ # CA1200: Avoid using cref tags with a prefix
138
+ dotnet_diagnostic.CA1200.severity = error
139
+
140
+ # CA1303: Do not pass literals as localized parameters
141
+ dotnet_diagnostic.CA1303.severity = error
142
+
143
+ # CA1304: Specify CultureInfo
144
+ dotnet_diagnostic.CA1304.severity = error
145
+
146
+ # CA1305: Specify IFormatProvider
147
+ dotnet_diagnostic.CA1305.severity = error
148
+
149
+ # CA1307: Specify StringComparison for clarity
150
+ dotnet_diagnostic.CA1307.severity = error
151
+
152
+ # CA1308: Normalize strings to uppercase
153
+ dotnet_diagnostic.CA1308.severity = error
154
+
155
+ # CA1309: Use ordinal string comparison
156
+ dotnet_diagnostic.CA1309.severity = error
157
+
158
+ # CA1310: Specify StringComparison for correctness
159
+ dotnet_diagnostic.CA1310.severity = error
160
+
161
+ # CA1311: Specify a culture or use an invariant version
162
+ dotnet_diagnostic.CA1311.severity = error
163
+
164
+ # CA1401: P/Invokes should not be visible
165
+ dotnet_diagnostic.CA1401.severity = error
166
+
167
+ # CA1416: Validate platform compatibility
168
+ dotnet_diagnostic.CA1416.severity = error
169
+
170
+ # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes
171
+ dotnet_diagnostic.CA1417.severity = error
172
+
173
+ # CA1418: Use valid platform string
174
+ dotnet_diagnostic.CA1418.severity = error
175
+
176
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
177
+ dotnet_diagnostic.CA1419.severity = error
178
+
179
+ # CA1420: Property, type, or attribute requires runtime marshalling
180
+ dotnet_diagnostic.CA1420.severity = error
181
+
182
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
183
+ dotnet_diagnostic.CA1421.severity = error
184
+
185
+ # CA1422: Validate platform compatibility
186
+ dotnet_diagnostic.CA1422.severity = error
187
+
188
+ # CA1507: Use nameof to express symbol names
189
+ dotnet_diagnostic.CA1507.severity = error
190
+
191
+ # CA1508: Avoid dead conditional code
192
+ dotnet_diagnostic.CA1508.severity = error
193
+
194
+ # CA1510: Use ArgumentNullException throw helper
195
+ dotnet_diagnostic.CA1510.severity = error
196
+
197
+ # CA1511: Use ArgumentException throw helper
198
+ dotnet_diagnostic.CA1511.severity = error
199
+
200
+ # CA1512: Use ArgumentOutOfRangeException throw helper
201
+ dotnet_diagnostic.CA1512.severity = error
202
+
203
+ # CA1513: Use ObjectDisposedException throw helper
204
+ dotnet_diagnostic.CA1513.severity = error
205
+
206
+ # CA1514: Avoid redundant length argument
207
+ dotnet_diagnostic.CA1514.severity = error
208
+
209
+ # CA1515: Consider making public types internal
210
+ dotnet_diagnostic.CA1515.severity = error
211
+
212
+ # CA1700: Do not name enum values 'Reserved'
213
+ dotnet_diagnostic.CA1700.severity = error
214
+
215
+ # CA1707: Identifiers should not contain underscores
216
+ dotnet_diagnostic.CA1707.severity = error
217
+
218
+ # CA1708: Identifiers should differ by more than case
219
+ dotnet_diagnostic.CA1708.severity = error
220
+
221
+ # CA1710: Identifiers should have correct suffix
222
+ dotnet_diagnostic.CA1710.severity = error
223
+
224
+ # CA1711: Identifiers should not have incorrect suffix
225
+ dotnet_diagnostic.CA1711.severity = error
226
+
227
+ # CA1712: Do not prefix enum values with type name
228
+ dotnet_diagnostic.CA1712.severity = error
229
+
230
+ # CA1713: Events should not have 'Before' or 'After' prefix
231
+ dotnet_diagnostic.CA1713.severity = error
232
+
233
+ # CA1715: Identifiers should have correct prefix
234
+ dotnet_diagnostic.CA1715.severity = error
235
+
236
+ # CA1716: Identifiers should not match keywords
237
+ dotnet_diagnostic.CA1716.severity = error
238
+
239
+ # CA1720: Identifier contains type name
240
+ dotnet_diagnostic.CA1720.severity = error
241
+
242
+ # CA1721: Property names should not match get methods
243
+ dotnet_diagnostic.CA1721.severity = error
244
+
245
+ # CA1724: Type names should not match namespaces
246
+ dotnet_diagnostic.CA1724.severity = error
247
+
248
+ # CA1725: Parameter names should match base declaration
249
+ dotnet_diagnostic.CA1725.severity = error
250
+
251
+ # CA1727: Use PascalCase for named placeholders
252
+ dotnet_diagnostic.CA1727.severity = error
253
+
254
+ # CA1802: Use literals where appropriate
255
+ dotnet_diagnostic.CA1802.severity = error
256
+
257
+ # CA1805: Do not initialize unnecessarily
258
+ dotnet_diagnostic.CA1805.severity = error
259
+
260
+ # CA1806: Do not ignore method results
261
+ dotnet_diagnostic.CA1806.severity = error
262
+
263
+ # CA1810: Initialize reference type static fields inline
264
+ dotnet_diagnostic.CA1810.severity = error
265
+
266
+ # CA1812: Avoid uninstantiated internal classes
267
+ dotnet_diagnostic.CA1812.severity = error
268
+
269
+ # CA1813: Avoid unsealed attributes
270
+ dotnet_diagnostic.CA1813.severity = error
271
+
272
+ # CA1814: Prefer jagged arrays over multidimensional
273
+ dotnet_diagnostic.CA1814.severity = error
274
+
275
+ # CA1815: Override equals and operator equals on value types
276
+ dotnet_diagnostic.CA1815.severity = error
277
+
278
+ # CA1816: Dispose methods should call SuppressFinalize
279
+ dotnet_diagnostic.CA1816.severity = error
280
+
281
+ # CA1819: Properties should not return arrays
282
+ dotnet_diagnostic.CA1819.severity = error
283
+
284
+ # CA1820: Test for empty strings using string length
285
+ dotnet_diagnostic.CA1820.severity = error
286
+
287
+ # CA1821: Remove empty Finalizers
288
+ dotnet_diagnostic.CA1821.severity = error
289
+
290
+ # CA1822: Mark members as static
291
+ dotnet_diagnostic.CA1822.severity = error
292
+
293
+ # CA1823: Avoid unused private fields
294
+ dotnet_diagnostic.CA1823.severity = error
295
+
296
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
297
+ dotnet_diagnostic.CA1824.severity = error
298
+
299
+ # CA1825: Avoid zero-length array allocations
300
+ dotnet_diagnostic.CA1825.severity = error
301
+
302
+ # CA1826: Do not use Enumerable methods on indexable collections
303
+ dotnet_diagnostic.CA1826.severity = error
304
+
305
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
306
+ dotnet_diagnostic.CA1827.severity = error
307
+
308
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
309
+ dotnet_diagnostic.CA1828.severity = error
310
+
311
+ # CA1829: Use Length/Count property instead of Count() when available
312
+ dotnet_diagnostic.CA1829.severity = error
313
+
314
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
315
+ dotnet_diagnostic.CA1830.severity = error
316
+
317
+ # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
318
+ dotnet_diagnostic.CA1831.severity = error
319
+
320
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
321
+ dotnet_diagnostic.CA1832.severity = error
322
+
323
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
324
+ dotnet_diagnostic.CA1833.severity = error
325
+
326
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
327
+ dotnet_diagnostic.CA1834.severity = error
328
+
329
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
330
+ dotnet_diagnostic.CA1835.severity = error
331
+
332
+ # CA1836: Prefer IsEmpty over Count
333
+ dotnet_diagnostic.CA1836.severity = error
334
+
335
+ # CA1837: Use 'Environment.ProcessId'
336
+ dotnet_diagnostic.CA1837.severity = error
337
+
338
+ # CA1838: Avoid 'StringBuilder' parameters for P/Invokes
339
+ dotnet_diagnostic.CA1838.severity = error
340
+
341
+ # CA1839: Use 'Environment.ProcessPath'
342
+ dotnet_diagnostic.CA1839.severity = error
343
+
344
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
345
+ dotnet_diagnostic.CA1840.severity = error
346
+
347
+ # CA1841: Prefer Dictionary.Contains methods
348
+ dotnet_diagnostic.CA1841.severity = error
349
+
350
+ # CA1842: Do not use 'WhenAll' with a single task
351
+ dotnet_diagnostic.CA1842.severity = error
352
+
353
+ # CA1843: Do not use 'WaitAll' with a single task
354
+ dotnet_diagnostic.CA1843.severity = error
355
+
356
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
357
+ dotnet_diagnostic.CA1844.severity = error
358
+
359
+ # CA1845: Use span-based 'string.Concat'
360
+ dotnet_diagnostic.CA1845.severity = error
361
+
362
+ # CA1846: Prefer 'AsSpan' over 'Substring'
363
+ dotnet_diagnostic.CA1846.severity = error
364
+
365
+ # CA1847: Use char literal for a single character lookup
366
+ dotnet_diagnostic.CA1847.severity = error
367
+
368
+ # CA1848: Use the LoggerMessage delegates
369
+ dotnet_diagnostic.CA1848.severity = error
370
+
371
+ # CA1849: Call async methods when in an async method
372
+ dotnet_diagnostic.CA1849.severity = error
373
+
374
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
375
+ dotnet_diagnostic.CA1850.severity = error
376
+
377
+ # CA1851: Possible multiple enumerations of 'IEnumerable' collection
378
+ dotnet_diagnostic.CA1851.severity = error
379
+
380
+ # CA1852: Seal internal types
381
+ dotnet_diagnostic.CA1852.severity = error
382
+
383
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
384
+ dotnet_diagnostic.CA1853.severity = error
385
+
386
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
387
+ dotnet_diagnostic.CA1854.severity = error
388
+
389
+ # CA1855: Prefer 'Clear' over 'Fill'
390
+ dotnet_diagnostic.CA1855.severity = error
391
+
392
+ # CA1857: A constant is expected for the parameter
393
+ dotnet_diagnostic.CA1857.severity = error
394
+
395
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
396
+ dotnet_diagnostic.CA1858.severity = error
397
+
398
+ # CA1859: Use concrete types when possible for improved performance
399
+ dotnet_diagnostic.CA1859.severity = error
400
+
401
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
402
+ dotnet_diagnostic.CA1860.severity = error
403
+
404
+ # CA1861: Avoid constant arrays as arguments
405
+ dotnet_diagnostic.CA1861.severity = error
406
+
407
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
408
+ dotnet_diagnostic.CA1862.severity = error
409
+
410
+ # CA1863: Use 'CompositeFormat'
411
+ dotnet_diagnostic.CA1863.severity = error
412
+
413
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
414
+ dotnet_diagnostic.CA1864.severity = error
415
+
416
+ # CA1865: Use char overload
417
+ dotnet_diagnostic.CA1865.severity = error
418
+
419
+ # CA1866: Use char overload
420
+ dotnet_diagnostic.CA1866.severity = error
421
+
422
+ # CA1867: Use char overload
423
+ dotnet_diagnostic.CA1867.severity = error
424
+
425
+ # CA1868: Unnecessary call to 'Contains(item)'
426
+ dotnet_diagnostic.CA1868.severity = error
427
+
428
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
429
+ dotnet_diagnostic.CA1869.severity = error
430
+
431
+ # CA1870: Use a cached 'SearchValues' instance
432
+ dotnet_diagnostic.CA1870.severity = error
433
+
434
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
435
+ dotnet_diagnostic.CA1871.severity = error
436
+
437
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
438
+ dotnet_diagnostic.CA1872.severity = error
439
+
440
+ # CA2000: Dispose objects before losing scope
441
+ dotnet_diagnostic.CA2000.severity = error
442
+
443
+ # CA2002: Do not lock on objects with weak identity
444
+ dotnet_diagnostic.CA2002.severity = error
445
+
446
+ # CA2007: Consider calling ConfigureAwait on the awaited task
447
+ dotnet_diagnostic.CA2007.severity = error
448
+
449
+ # CA2008: Do not create tasks without passing a TaskScheduler
450
+ dotnet_diagnostic.CA2008.severity = error
451
+
452
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
453
+ dotnet_diagnostic.CA2009.severity = error
454
+
455
+ # CA2011: Avoid infinite recursion
456
+ dotnet_diagnostic.CA2011.severity = error
457
+
458
+ # CA2012: Use ValueTasks correctly
459
+ dotnet_diagnostic.CA2012.severity = error
460
+
461
+ # CA2013: Do not use ReferenceEquals with value types
462
+ dotnet_diagnostic.CA2013.severity = error
463
+
464
+ # CA2014: Do not use stackalloc in loops
465
+ dotnet_diagnostic.CA2014.severity = error
466
+
467
+ # CA2015: Do not define finalizers for types derived from MemoryManager<T>
468
+ dotnet_diagnostic.CA2015.severity = error
469
+
470
+ # CA2016: Forward the 'CancellationToken' parameter to methods
471
+ dotnet_diagnostic.CA2016.severity = error
472
+
473
+ # CA2017: Parameter count mismatch
474
+ dotnet_diagnostic.CA2017.severity = error
475
+
476
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
477
+ dotnet_diagnostic.CA2018.severity = error
478
+
479
+ # CA2019: Improper 'ThreadStatic' field initialization
480
+ dotnet_diagnostic.CA2019.severity = error
481
+
482
+ # CA2020: Prevent behavioral change
483
+ dotnet_diagnostic.CA2020.severity = error
484
+
485
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
486
+ dotnet_diagnostic.CA2021.severity = error
487
+
488
+ # CA2022: Avoid inexact read with 'Stream.Read'
489
+ dotnet_diagnostic.CA2022.severity = error
490
+
491
+ # CA2100: Review SQL queries for security vulnerabilities
492
+ dotnet_diagnostic.CA2100.severity = error
493
+
494
+ # CA2101: Specify marshaling for P/Invoke string arguments
495
+ dotnet_diagnostic.CA2101.severity = error
496
+
497
+ # CA2119: Seal methods that satisfy private interfaces
498
+ dotnet_diagnostic.CA2119.severity = error
499
+
500
+ # CA2153: Do Not Catch Corrupted State Exceptions
501
+ dotnet_diagnostic.CA2153.severity = error
502
+
503
+ # CA2200: Rethrow to preserve stack details
504
+ dotnet_diagnostic.CA2200.severity = error
505
+
506
+ # CA2201: Do not raise reserved exception types
507
+ dotnet_diagnostic.CA2201.severity = error
508
+
509
+ # CA2207: Initialize value type static fields inline
510
+ dotnet_diagnostic.CA2207.severity = error
511
+
512
+ # CA2208: Instantiate argument exceptions correctly
513
+ dotnet_diagnostic.CA2208.severity = error
514
+
515
+ # CA2211: Non-constant fields should not be visible
516
+ dotnet_diagnostic.CA2211.severity = error
517
+
518
+ # CA2213: Disposable fields should be disposed
519
+ dotnet_diagnostic.CA2213.severity = error
520
+
521
+ # CA2214: Do not call overridable methods in constructors
522
+ dotnet_diagnostic.CA2214.severity = error
523
+
524
+ # CA2215: Dispose methods should call base class dispose
525
+ dotnet_diagnostic.CA2215.severity = error
526
+
527
+ # CA2216: Disposable types should declare finalizer
528
+ dotnet_diagnostic.CA2216.severity = error
529
+
530
+ # CA2217: Do not mark enums with FlagsAttribute
531
+ dotnet_diagnostic.CA2217.severity = error
532
+
533
+ # CA2218: Override GetHashCode on overriding Equals
534
+ dotnet_diagnostic.CA2218.severity = error
535
+
536
+ # CA2219: Do not raise exceptions in finally clauses
537
+ dotnet_diagnostic.CA2219.severity = error
538
+
539
+ # CA2224: Override Equals on overloading operator equals
540
+ dotnet_diagnostic.CA2224.severity = error
541
+
542
+ # CA2225: Operator overloads have named alternates
543
+ dotnet_diagnostic.CA2225.severity = error
544
+
545
+ # CA2226: Operators should have symmetrical overloads
546
+ dotnet_diagnostic.CA2226.severity = error
547
+
548
+ # CA2227: Collection properties should be read only
549
+ dotnet_diagnostic.CA2227.severity = error
550
+
551
+ # CA2231: Overload operator equals on overriding value type Equals
552
+ dotnet_diagnostic.CA2231.severity = error
553
+
554
+ # CA2234: Pass system uri objects instead of strings
555
+ dotnet_diagnostic.CA2234.severity = error
556
+
557
+ # CA2235: Mark all non-serializable fields
558
+ dotnet_diagnostic.CA2235.severity = error
559
+
560
+ # CA2237: Mark ISerializable types with serializable
561
+ dotnet_diagnostic.CA2237.severity = error
562
+
563
+ # CA2241: Provide correct arguments to formatting methods
564
+ dotnet_diagnostic.CA2241.severity = error
565
+
566
+ # CA2242: Test for NaN correctly
567
+ dotnet_diagnostic.CA2242.severity = error
568
+
569
+ # CA2243: Attribute string literals should parse correctly
570
+ dotnet_diagnostic.CA2243.severity = error
571
+
572
+ # CA2244: Do not duplicate indexed element initializations
573
+ dotnet_diagnostic.CA2244.severity = error
574
+
575
+ # CA2245: Do not assign a property to itself
576
+ dotnet_diagnostic.CA2245.severity = error
577
+
578
+ # CA2246: Assigning symbol and its member in the same statement
579
+ dotnet_diagnostic.CA2246.severity = error
580
+
581
+ # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
582
+ dotnet_diagnostic.CA2247.severity = error
583
+
584
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
585
+ dotnet_diagnostic.CA2248.severity = error
586
+
587
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
588
+ dotnet_diagnostic.CA2249.severity = error
589
+
590
+ # CA2250: Use 'ThrowIfCancellationRequested'
591
+ dotnet_diagnostic.CA2250.severity = error
592
+
593
+ # CA2251: Use 'string.Equals'
594
+ dotnet_diagnostic.CA2251.severity = error
595
+
596
+ # CA2253: Named placeholders should not be numeric values
597
+ dotnet_diagnostic.CA2253.severity = error
598
+
599
+ # CA2254: Template should be a static expression
600
+ dotnet_diagnostic.CA2254.severity = error
601
+
602
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
603
+ dotnet_diagnostic.CA2255.severity = error
604
+
605
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
606
+ dotnet_diagnostic.CA2256.severity = error
607
+
608
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
609
+ dotnet_diagnostic.CA2257.severity = error
610
+
611
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
612
+ dotnet_diagnostic.CA2258.severity = error
613
+
614
+ # CA2259: 'ThreadStatic' only affects static fields
615
+ dotnet_diagnostic.CA2259.severity = error
616
+
617
+ # CA2260: Use correct type parameter
618
+ dotnet_diagnostic.CA2260.severity = error
619
+
620
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
621
+ dotnet_diagnostic.CA2261.severity = error
622
+
623
+ # CA2262: Set 'MaxResponseHeadersLength' properly
624
+ dotnet_diagnostic.CA2262.severity = error
625
+
626
+ # CA2263: Prefer generic overload when type is known
627
+ dotnet_diagnostic.CA2263.severity = error
628
+
629
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
630
+ dotnet_diagnostic.CA2264.severity = error
631
+
632
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
633
+ dotnet_diagnostic.CA2265.severity = error
634
+
635
+ # CA2300: Do not use insecure deserializer BinaryFormatter
636
+ dotnet_diagnostic.CA2300.severity = error
637
+
638
+ # CA2301: Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder
639
+ dotnet_diagnostic.CA2301.severity = error
640
+
641
+ # CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize
642
+ dotnet_diagnostic.CA2302.severity = error
643
+
644
+ # CA2305: Do not use insecure deserializer LosFormatter
645
+ dotnet_diagnostic.CA2305.severity = error
646
+
647
+ # CA2310: Do not use insecure deserializer NetDataContractSerializer
648
+ dotnet_diagnostic.CA2310.severity = error
649
+
650
+ # CA2311: Do not deserialize without first setting NetDataContractSerializer.Binder
651
+ dotnet_diagnostic.CA2311.severity = error
652
+
653
+ # CA2312: Ensure NetDataContractSerializer.Binder is set before deserializing
654
+ dotnet_diagnostic.CA2312.severity = error
655
+
656
+ # CA2315: Do not use insecure deserializer ObjectStateFormatter
657
+ dotnet_diagnostic.CA2315.severity = error
658
+
659
+ # CA2321: Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver
660
+ dotnet_diagnostic.CA2321.severity = error
661
+
662
+ # CA2322: Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing
663
+ dotnet_diagnostic.CA2322.severity = error
664
+
665
+ # CA2326: Do not use TypeNameHandling values other than None
666
+ dotnet_diagnostic.CA2326.severity = error
667
+
668
+ # CA2327: Do not use insecure JsonSerializerSettings
669
+ dotnet_diagnostic.CA2327.severity = error
670
+
671
+ # CA2328: Ensure that JsonSerializerSettings are secure
672
+ dotnet_diagnostic.CA2328.severity = error
673
+
674
+ # CA2329: Do not deserialize with JsonSerializer using an insecure configuration
675
+ dotnet_diagnostic.CA2329.severity = error
676
+
677
+ # CA2330: Ensure that JsonSerializer has a secure configuration when deserializing
678
+ dotnet_diagnostic.CA2330.severity = error
679
+
680
+ # CA2350: Do not use DataTable.ReadXml() with untrusted data
681
+ dotnet_diagnostic.CA2350.severity = error
682
+
683
+ # CA2351: Do not use DataSet.ReadXml() with untrusted data
684
+ dotnet_diagnostic.CA2351.severity = error
685
+
686
+ # CA2352: Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks
687
+ dotnet_diagnostic.CA2352.severity = error
688
+
689
+ # CA2353: Unsafe DataSet or DataTable in serializable type
690
+ dotnet_diagnostic.CA2353.severity = error
691
+
692
+ # CA2354: Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks
693
+ dotnet_diagnostic.CA2354.severity = error
694
+
695
+ # CA2355: Unsafe DataSet or DataTable type found in deserializable object graph
696
+ dotnet_diagnostic.CA2355.severity = error
697
+
698
+ # CA2356: Unsafe DataSet or DataTable type in web deserializable object graph
699
+ dotnet_diagnostic.CA2356.severity = error
700
+
701
+ # CA2361: Ensure auto-generated class containing DataSet.ReadXml() is not used with untrusted data
702
+ dotnet_diagnostic.CA2361.severity = error
703
+
704
+ # CA2362: Unsafe DataSet or DataTable in auto-generated serializable type can be vulnerable to remote code execution attacks
705
+ dotnet_diagnostic.CA2362.severity = error
706
+
707
+ # CA3001: Review code for SQL injection vulnerabilities
708
+ dotnet_diagnostic.CA3001.severity = error
709
+
710
+ # CA3002: Review code for XSS vulnerabilities
711
+ dotnet_diagnostic.CA3002.severity = error
712
+
713
+ # CA3003: Review code for file path injection vulnerabilities
714
+ dotnet_diagnostic.CA3003.severity = error
715
+
716
+ # CA3004: Review code for information disclosure vulnerabilities
717
+ dotnet_diagnostic.CA3004.severity = error
718
+
719
+ # CA3005: Review code for LDAP injection vulnerabilities
720
+ dotnet_diagnostic.CA3005.severity = error
721
+
722
+ # CA3006: Review code for process command injection vulnerabilities
723
+ dotnet_diagnostic.CA3006.severity = error
724
+
725
+ # CA3007: Review code for open redirect vulnerabilities
726
+ dotnet_diagnostic.CA3007.severity = error
727
+
728
+ # CA3008: Review code for XPath injection vulnerabilities
729
+ dotnet_diagnostic.CA3008.severity = error
730
+
731
+ # CA3009: Review code for XML injection vulnerabilities
732
+ dotnet_diagnostic.CA3009.severity = error
733
+
734
+ # CA3010: Review code for XAML injection vulnerabilities
735
+ dotnet_diagnostic.CA3010.severity = error
736
+
737
+ # CA3011: Review code for DLL injection vulnerabilities
738
+ dotnet_diagnostic.CA3011.severity = error
739
+
740
+ # CA3012: Review code for regex injection vulnerabilities
741
+ dotnet_diagnostic.CA3012.severity = error
742
+
743
+ # CA3061: Do Not Add Schema By URL
744
+ dotnet_diagnostic.CA3061.severity = error
745
+
746
+ # CA3075: Insecure DTD processing in XML
747
+ dotnet_diagnostic.CA3075.severity = error
748
+
749
+ # CA3076: Insecure XSLT script processing
750
+ dotnet_diagnostic.CA3076.severity = error
751
+
752
+ # CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader
753
+ dotnet_diagnostic.CA3077.severity = error
754
+
755
+ # CA3147: Mark Verb Handlers With Validate Antiforgery Token
756
+ dotnet_diagnostic.CA3147.severity = error
757
+
758
+ # CA5350: Do Not Use Weak Cryptographic Algorithms
759
+ dotnet_diagnostic.CA5350.severity = error
760
+
761
+ # CA5351: Do Not Use Broken Cryptographic Algorithms
762
+ dotnet_diagnostic.CA5351.severity = error
763
+
764
+ # CA5358: Review cipher mode usage with cryptography experts
765
+ dotnet_diagnostic.CA5358.severity = error
766
+
767
+ # CA5359: Do Not Disable Certificate Validation
768
+ dotnet_diagnostic.CA5359.severity = error
769
+
770
+ # CA5360: Do Not Call Dangerous Methods In Deserialization
771
+ dotnet_diagnostic.CA5360.severity = error
772
+
773
+ # CA5361: Do Not Disable SChannel Use of Strong Crypto
774
+ dotnet_diagnostic.CA5361.severity = error
775
+
776
+ # CA5362: Potential reference cycle in deserialized object graph
777
+ dotnet_diagnostic.CA5362.severity = error
778
+
779
+ # CA5363: Do Not Disable Request Validation
780
+ dotnet_diagnostic.CA5363.severity = error
781
+
782
+ # CA5364: Do Not Use Deprecated Security Protocols
783
+ dotnet_diagnostic.CA5364.severity = error
784
+
785
+ # CA5365: Do Not Disable HTTP Header Checking
786
+ dotnet_diagnostic.CA5365.severity = error
787
+
788
+ # CA5366: Use XmlReader for 'DataSet.ReadXml()'
789
+ dotnet_diagnostic.CA5366.severity = error
790
+
791
+ # CA5367: Do Not Serialize Types With Pointer Fields
792
+ dotnet_diagnostic.CA5367.severity = error
793
+
794
+ # CA5368: Set ViewStateUserKey For Classes Derived From Page
795
+ dotnet_diagnostic.CA5368.severity = error
796
+
797
+ # CA5369: Use XmlReader for 'XmlSerializer.Deserialize()'
798
+ dotnet_diagnostic.CA5369.severity = error
799
+
800
+ # CA5370: Use XmlReader for XmlValidatingReader constructor
801
+ dotnet_diagnostic.CA5370.severity = error
802
+
803
+ # CA5371: Use XmlReader for 'XmlSchema.Read()'
804
+ dotnet_diagnostic.CA5371.severity = error
805
+
806
+ # CA5372: Use XmlReader for XPathDocument constructor
807
+ dotnet_diagnostic.CA5372.severity = error
808
+
809
+ # CA5373: Do not use obsolete key derivation function
810
+ dotnet_diagnostic.CA5373.severity = error
811
+
812
+ # CA5374: Do Not Use XslTransform
813
+ dotnet_diagnostic.CA5374.severity = error
814
+
815
+ # CA5375: Do Not Use Account Shared Access Signature
816
+ dotnet_diagnostic.CA5375.severity = error
817
+
818
+ # CA5376: Use SharedAccessProtocol HttpsOnly
819
+ dotnet_diagnostic.CA5376.severity = error
820
+
821
+ # CA5377: Use Container Level Access Policy
822
+ dotnet_diagnostic.CA5377.severity = error
823
+
824
+ # CA5378: Do not disable ServicePointManagerSecurityProtocols
825
+ dotnet_diagnostic.CA5378.severity = error
826
+
827
+ # CA5379: Ensure Key Derivation Function algorithm is sufficiently strong
828
+ dotnet_diagnostic.CA5379.severity = error
829
+
830
+ # CA5380: Do Not Add Certificates To Root Store
831
+ dotnet_diagnostic.CA5380.severity = error
832
+
833
+ # CA5381: Ensure Certificates Are Not Added To Root Store
834
+ dotnet_diagnostic.CA5381.severity = error
835
+
836
+ # CA5382: Use Secure Cookies In ASP.NET Core
837
+ dotnet_diagnostic.CA5382.severity = error
838
+
839
+ # CA5383: Ensure Use Secure Cookies In ASP.NET Core
840
+ dotnet_diagnostic.CA5383.severity = error
841
+
842
+ # CA5384: Do Not Use Digital Signature Algorithm (DSA)
843
+ dotnet_diagnostic.CA5384.severity = error
844
+
845
+ # CA5385: Use Rivest-Shamir-Adleman (RSA) Algorithm With Sufficient Key Size
846
+ dotnet_diagnostic.CA5385.severity = error
847
+
848
+ # CA5386: Avoid hardcoding SecurityProtocolType value
849
+ dotnet_diagnostic.CA5386.severity = error
850
+
851
+ # CA5387: Do Not Use Weak Key Derivation Function With Insufficient Iteration Count
852
+ dotnet_diagnostic.CA5387.severity = error
853
+
854
+ # CA5388: Ensure Sufficient Iteration Count When Using Weak Key Derivation Function
855
+ dotnet_diagnostic.CA5388.severity = error
856
+
857
+ # CA5389: Do Not Add Archive Item's Path To The Target File System Path
858
+ dotnet_diagnostic.CA5389.severity = error
859
+
860
+ # CA5390: Do not hard-code encryption key
861
+ dotnet_diagnostic.CA5390.severity = error
862
+
863
+ # CA5391: Use antiforgery tokens in ASP.NET Core MVC controllers
864
+ dotnet_diagnostic.CA5391.severity = error
865
+
866
+ # CA5392: Use DefaultDllImportSearchPaths attribute for P/Invokes
867
+ dotnet_diagnostic.CA5392.severity = error
868
+
869
+ # CA5393: Do not use unsafe DllImportSearchPath value
870
+ dotnet_diagnostic.CA5393.severity = error
871
+
872
+ # CA5394: Do not use insecure randomness
873
+ dotnet_diagnostic.CA5394.severity = error
874
+
875
+ # CA5395: Miss HttpVerb attribute for action methods
876
+ dotnet_diagnostic.CA5395.severity = error
877
+
878
+ # CA5396: Set HttpOnly to true for HttpCookie
879
+ dotnet_diagnostic.CA5396.severity = error
880
+
881
+ # CA5397: Do not use deprecated SslProtocols values
882
+ dotnet_diagnostic.CA5397.severity = error
883
+
884
+ # CA5398: Avoid hardcoded SslProtocols values
885
+ dotnet_diagnostic.CA5398.severity = error
886
+
887
+ # CA5399: HttpClients should enable certificate revocation list checks
888
+ dotnet_diagnostic.CA5399.severity = error
889
+
890
+ # CA5400: Ensure HttpClient certificate revocation list check is not disabled
891
+ dotnet_diagnostic.CA5400.severity = error
892
+
893
+ # CA5401: Do not use CreateEncryptor with non-default IV
894
+ dotnet_diagnostic.CA5401.severity = error
895
+
896
+ # CA5402: Use CreateEncryptor with the default IV
897
+ dotnet_diagnostic.CA5402.severity = error
898
+
899
+ # CA5403: Do not hard-code certificate
900
+ dotnet_diagnostic.CA5403.severity = error
901
+
902
+ # CA5404: Do not disable token validation checks
903
+ dotnet_diagnostic.CA5404.severity = error
904
+
905
+ # CA5405: Do not always skip token validation in delegates
906
+ dotnet_diagnostic.CA5405.severity = error
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_default.globalconfig ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'Default' analysis mode
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'Default' analysis mode. Rules that are first released in a version later than '10.0' are disabled.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_default_warnaserror.globalconfig ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'Default' analysis mode escalated to 'error' severity
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'Default' analysis mode. Rules that are first released in a version later than '10.0' are disabled. Enabled rules with 'warning' severity are escalated to 'error' severity to respect 'CodeAnalysisTreatWarningsAsErrors' MSBuild property.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1416: Validate platform compatibility
12
+ dotnet_diagnostic.CA1416.severity = error
13
+
14
+ # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes
15
+ dotnet_diagnostic.CA1417.severity = error
16
+
17
+ # CA1418: Use valid platform string
18
+ dotnet_diagnostic.CA1418.severity = error
19
+
20
+ # CA1420: Property, type, or attribute requires runtime marshalling
21
+ dotnet_diagnostic.CA1420.severity = error
22
+
23
+ # CA1422: Validate platform compatibility
24
+ dotnet_diagnostic.CA1422.severity = error
25
+
26
+ # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
27
+ dotnet_diagnostic.CA1831.severity = error
28
+
29
+ # CA1857: A constant is expected for the parameter
30
+ dotnet_diagnostic.CA1857.severity = error
31
+
32
+ # CA2013: Do not use ReferenceEquals with value types
33
+ dotnet_diagnostic.CA2013.severity = error
34
+
35
+ # CA2014: Do not use stackalloc in loops
36
+ dotnet_diagnostic.CA2014.severity = error
37
+
38
+ # CA2015: Do not define finalizers for types derived from MemoryManager<T>
39
+ dotnet_diagnostic.CA2015.severity = error
40
+
41
+ # CA2017: Parameter count mismatch
42
+ dotnet_diagnostic.CA2017.severity = error
43
+
44
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
45
+ dotnet_diagnostic.CA2018.severity = error
46
+
47
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
48
+ dotnet_diagnostic.CA2021.severity = error
49
+
50
+ # CA2022: Avoid inexact read with 'Stream.Read'
51
+ dotnet_diagnostic.CA2022.severity = error
52
+
53
+ # CA2200: Rethrow to preserve stack details
54
+ dotnet_diagnostic.CA2200.severity = error
55
+
56
+ # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
57
+ dotnet_diagnostic.CA2247.severity = error
58
+
59
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
60
+ dotnet_diagnostic.CA2255.severity = error
61
+
62
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
63
+ dotnet_diagnostic.CA2256.severity = error
64
+
65
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
66
+ dotnet_diagnostic.CA2257.severity = error
67
+
68
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
69
+ dotnet_diagnostic.CA2258.severity = error
70
+
71
+ # CA2259: 'ThreadStatic' only affects static fields
72
+ dotnet_diagnostic.CA2259.severity = error
73
+
74
+ # CA2260: Use correct type parameter
75
+ dotnet_diagnostic.CA2260.severity = error
76
+
77
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
78
+ dotnet_diagnostic.CA2261.severity = error
79
+
80
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
81
+ dotnet_diagnostic.CA2264.severity = error
82
+
83
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
84
+ dotnet_diagnostic.CA2265.severity = error
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_minimum.globalconfig ADDED
@@ -0,0 +1,276 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'Minimum' analysis mode
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'Minimum' analysis mode. Rules that are first released in a version later than '10.0' are disabled.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1016: Mark assemblies with assembly version
12
+ dotnet_diagnostic.CA1016.severity = warning
13
+
14
+ # CA1018: Mark attributes with AttributeUsageAttribute
15
+ dotnet_diagnostic.CA1018.severity = warning
16
+
17
+ # CA1041: Provide ObsoleteAttribute message
18
+ dotnet_diagnostic.CA1041.severity = warning
19
+
20
+ # CA1047: Do not declare protected member in sealed type
21
+ dotnet_diagnostic.CA1047.severity = warning
22
+
23
+ # CA1050: Declare types in namespaces
24
+ dotnet_diagnostic.CA1050.severity = warning
25
+
26
+ # CA1061: Do not hide base class methods
27
+ dotnet_diagnostic.CA1061.severity = warning
28
+
29
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
30
+ dotnet_diagnostic.CA1067.severity = warning
31
+
32
+ # CA1068: CancellationToken parameters must come last
33
+ dotnet_diagnostic.CA1068.severity = warning
34
+
35
+ # CA1069: Enums values should not be duplicated
36
+ dotnet_diagnostic.CA1069.severity = warning
37
+
38
+ # CA1070: Do not declare event fields as virtual
39
+ dotnet_diagnostic.CA1070.severity = warning
40
+
41
+ # CA1401: P/Invokes should not be visible
42
+ dotnet_diagnostic.CA1401.severity = warning
43
+
44
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
45
+ dotnet_diagnostic.CA1419.severity = warning
46
+
47
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
48
+ dotnet_diagnostic.CA1421.severity = warning
49
+
50
+ # CA1507: Use nameof to express symbol names
51
+ dotnet_diagnostic.CA1507.severity = warning
52
+
53
+ # CA1510: Use ArgumentNullException throw helper
54
+ dotnet_diagnostic.CA1510.severity = warning
55
+
56
+ # CA1511: Use ArgumentException throw helper
57
+ dotnet_diagnostic.CA1511.severity = warning
58
+
59
+ # CA1512: Use ArgumentOutOfRangeException throw helper
60
+ dotnet_diagnostic.CA1512.severity = warning
61
+
62
+ # CA1513: Use ObjectDisposedException throw helper
63
+ dotnet_diagnostic.CA1513.severity = warning
64
+
65
+ # CA1514: Avoid redundant length argument
66
+ dotnet_diagnostic.CA1514.severity = warning
67
+
68
+ # CA1806: Do not ignore method results
69
+ dotnet_diagnostic.CA1806.severity = warning
70
+
71
+ # CA1816: Dispose methods should call SuppressFinalize
72
+ dotnet_diagnostic.CA1816.severity = warning
73
+
74
+ # CA1821: Remove empty Finalizers
75
+ dotnet_diagnostic.CA1821.severity = warning
76
+
77
+ # CA1822: Mark members as static
78
+ dotnet_diagnostic.CA1822.severity = warning
79
+
80
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
81
+ dotnet_diagnostic.CA1824.severity = warning
82
+
83
+ # CA1825: Avoid zero-length array allocations
84
+ dotnet_diagnostic.CA1825.severity = warning
85
+
86
+ # CA1826: Do not use Enumerable methods on indexable collections
87
+ dotnet_diagnostic.CA1826.severity = warning
88
+
89
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
90
+ dotnet_diagnostic.CA1827.severity = warning
91
+
92
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
93
+ dotnet_diagnostic.CA1828.severity = warning
94
+
95
+ # CA1829: Use Length/Count property instead of Count() when available
96
+ dotnet_diagnostic.CA1829.severity = warning
97
+
98
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
99
+ dotnet_diagnostic.CA1830.severity = warning
100
+
101
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
102
+ dotnet_diagnostic.CA1832.severity = warning
103
+
104
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
105
+ dotnet_diagnostic.CA1833.severity = warning
106
+
107
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
108
+ dotnet_diagnostic.CA1834.severity = warning
109
+
110
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
111
+ dotnet_diagnostic.CA1835.severity = warning
112
+
113
+ # CA1836: Prefer IsEmpty over Count
114
+ dotnet_diagnostic.CA1836.severity = warning
115
+
116
+ # CA1837: Use 'Environment.ProcessId'
117
+ dotnet_diagnostic.CA1837.severity = warning
118
+
119
+ # CA1839: Use 'Environment.ProcessPath'
120
+ dotnet_diagnostic.CA1839.severity = warning
121
+
122
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
123
+ dotnet_diagnostic.CA1840.severity = warning
124
+
125
+ # CA1841: Prefer Dictionary.Contains methods
126
+ dotnet_diagnostic.CA1841.severity = warning
127
+
128
+ # CA1842: Do not use 'WhenAll' with a single task
129
+ dotnet_diagnostic.CA1842.severity = warning
130
+
131
+ # CA1843: Do not use 'WaitAll' with a single task
132
+ dotnet_diagnostic.CA1843.severity = warning
133
+
134
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
135
+ dotnet_diagnostic.CA1844.severity = warning
136
+
137
+ # CA1845: Use span-based 'string.Concat'
138
+ dotnet_diagnostic.CA1845.severity = warning
139
+
140
+ # CA1846: Prefer 'AsSpan' over 'Substring'
141
+ dotnet_diagnostic.CA1846.severity = warning
142
+
143
+ # CA1847: Use char literal for a single character lookup
144
+ dotnet_diagnostic.CA1847.severity = warning
145
+
146
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
147
+ dotnet_diagnostic.CA1850.severity = warning
148
+
149
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
150
+ dotnet_diagnostic.CA1853.severity = warning
151
+
152
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
153
+ dotnet_diagnostic.CA1854.severity = warning
154
+
155
+ # CA1855: Prefer 'Clear' over 'Fill'
156
+ dotnet_diagnostic.CA1855.severity = warning
157
+
158
+ # CA1856: Incorrect usage of ConstantExpected attribute
159
+ dotnet_diagnostic.CA1856.severity = warning
160
+
161
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
162
+ dotnet_diagnostic.CA1858.severity = warning
163
+
164
+ # CA1859: Use concrete types when possible for improved performance
165
+ dotnet_diagnostic.CA1859.severity = warning
166
+
167
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
168
+ dotnet_diagnostic.CA1860.severity = warning
169
+
170
+ # CA1861: Avoid constant arrays as arguments
171
+ dotnet_diagnostic.CA1861.severity = warning
172
+
173
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
174
+ dotnet_diagnostic.CA1862.severity = warning
175
+
176
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
177
+ dotnet_diagnostic.CA1864.severity = warning
178
+
179
+ # CA1865: Use char overload
180
+ dotnet_diagnostic.CA1865.severity = warning
181
+
182
+ # CA1866: Use char overload
183
+ dotnet_diagnostic.CA1866.severity = warning
184
+
185
+ # CA1868: Unnecessary call to 'Contains(item)'
186
+ dotnet_diagnostic.CA1868.severity = warning
187
+
188
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
189
+ dotnet_diagnostic.CA1869.severity = warning
190
+
191
+ # CA1870: Use a cached 'SearchValues' instance
192
+ dotnet_diagnostic.CA1870.severity = warning
193
+
194
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
195
+ dotnet_diagnostic.CA1871.severity = warning
196
+
197
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
198
+ dotnet_diagnostic.CA1872.severity = warning
199
+
200
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
201
+ dotnet_diagnostic.CA2009.severity = warning
202
+
203
+ # CA2011: Avoid infinite recursion
204
+ dotnet_diagnostic.CA2011.severity = warning
205
+
206
+ # CA2012: Use ValueTasks correctly
207
+ dotnet_diagnostic.CA2012.severity = warning
208
+
209
+ # CA2016: Forward the 'CancellationToken' parameter to methods
210
+ dotnet_diagnostic.CA2016.severity = warning
211
+
212
+ # CA2019: Improper 'ThreadStatic' field initialization
213
+ dotnet_diagnostic.CA2019.severity = warning
214
+
215
+ # CA2020: Prevent behavioral change
216
+ dotnet_diagnostic.CA2020.severity = warning
217
+
218
+ # CA2101: Specify marshaling for P/Invoke string arguments
219
+ dotnet_diagnostic.CA2101.severity = warning
220
+
221
+ # CA2208: Instantiate argument exceptions correctly
222
+ dotnet_diagnostic.CA2208.severity = warning
223
+
224
+ # CA2211: Non-constant fields should not be visible
225
+ dotnet_diagnostic.CA2211.severity = warning
226
+
227
+ # CA2218: Override GetHashCode on overriding Equals
228
+ dotnet_diagnostic.CA2218.severity = warning
229
+
230
+ # CA2219: Do not raise exceptions in finally clauses
231
+ dotnet_diagnostic.CA2219.severity = warning
232
+
233
+ # CA2224: Override Equals on overloading operator equals
234
+ dotnet_diagnostic.CA2224.severity = warning
235
+
236
+ # CA2231: Overload operator equals on overriding value type Equals
237
+ dotnet_diagnostic.CA2231.severity = warning
238
+
239
+ # CA2241: Provide correct arguments to formatting methods
240
+ dotnet_diagnostic.CA2241.severity = warning
241
+
242
+ # CA2242: Test for NaN correctly
243
+ dotnet_diagnostic.CA2242.severity = warning
244
+
245
+ # CA2244: Do not duplicate indexed element initializations
246
+ dotnet_diagnostic.CA2244.severity = warning
247
+
248
+ # CA2245: Do not assign a property to itself
249
+ dotnet_diagnostic.CA2245.severity = warning
250
+
251
+ # CA2246: Assigning symbol and its member in the same statement
252
+ dotnet_diagnostic.CA2246.severity = warning
253
+
254
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
255
+ dotnet_diagnostic.CA2248.severity = warning
256
+
257
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
258
+ dotnet_diagnostic.CA2249.severity = warning
259
+
260
+ # CA2250: Use 'ThrowIfCancellationRequested'
261
+ dotnet_diagnostic.CA2250.severity = warning
262
+
263
+ # CA2252: This API requires opting into preview features
264
+ dotnet_diagnostic.CA2252.severity = warning
265
+
266
+ # CA2253: Named placeholders should not be numeric values
267
+ dotnet_diagnostic.CA2253.severity = warning
268
+
269
+ # CA2254: Template should be a static expression
270
+ dotnet_diagnostic.CA2254.severity = warning
271
+
272
+ # CA2262: Set 'MaxResponseHeadersLength' properly
273
+ dotnet_diagnostic.CA2262.severity = warning
274
+
275
+ # CA2263: Prefer generic overload when type is known
276
+ dotnet_diagnostic.CA2263.severity = warning
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_minimum_warnaserror.globalconfig ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'Minimum' analysis mode escalated to 'error' severity
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'Minimum' analysis mode. Rules that are first released in a version later than '10.0' are disabled. Enabled rules with 'warning' severity are escalated to 'error' severity to respect 'CodeAnalysisTreatWarningsAsErrors' MSBuild property.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1016: Mark assemblies with assembly version
12
+ dotnet_diagnostic.CA1016.severity = error
13
+
14
+ # CA1018: Mark attributes with AttributeUsageAttribute
15
+ dotnet_diagnostic.CA1018.severity = error
16
+
17
+ # CA1041: Provide ObsoleteAttribute message
18
+ dotnet_diagnostic.CA1041.severity = error
19
+
20
+ # CA1047: Do not declare protected member in sealed type
21
+ dotnet_diagnostic.CA1047.severity = error
22
+
23
+ # CA1050: Declare types in namespaces
24
+ dotnet_diagnostic.CA1050.severity = error
25
+
26
+ # CA1061: Do not hide base class methods
27
+ dotnet_diagnostic.CA1061.severity = error
28
+
29
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
30
+ dotnet_diagnostic.CA1067.severity = error
31
+
32
+ # CA1068: CancellationToken parameters must come last
33
+ dotnet_diagnostic.CA1068.severity = error
34
+
35
+ # CA1069: Enums values should not be duplicated
36
+ dotnet_diagnostic.CA1069.severity = error
37
+
38
+ # CA1070: Do not declare event fields as virtual
39
+ dotnet_diagnostic.CA1070.severity = error
40
+
41
+ # CA1401: P/Invokes should not be visible
42
+ dotnet_diagnostic.CA1401.severity = error
43
+
44
+ # CA1416: Validate platform compatibility
45
+ dotnet_diagnostic.CA1416.severity = error
46
+
47
+ # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes
48
+ dotnet_diagnostic.CA1417.severity = error
49
+
50
+ # CA1418: Use valid platform string
51
+ dotnet_diagnostic.CA1418.severity = error
52
+
53
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
54
+ dotnet_diagnostic.CA1419.severity = error
55
+
56
+ # CA1420: Property, type, or attribute requires runtime marshalling
57
+ dotnet_diagnostic.CA1420.severity = error
58
+
59
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
60
+ dotnet_diagnostic.CA1421.severity = error
61
+
62
+ # CA1422: Validate platform compatibility
63
+ dotnet_diagnostic.CA1422.severity = error
64
+
65
+ # CA1507: Use nameof to express symbol names
66
+ dotnet_diagnostic.CA1507.severity = error
67
+
68
+ # CA1510: Use ArgumentNullException throw helper
69
+ dotnet_diagnostic.CA1510.severity = error
70
+
71
+ # CA1511: Use ArgumentException throw helper
72
+ dotnet_diagnostic.CA1511.severity = error
73
+
74
+ # CA1512: Use ArgumentOutOfRangeException throw helper
75
+ dotnet_diagnostic.CA1512.severity = error
76
+
77
+ # CA1513: Use ObjectDisposedException throw helper
78
+ dotnet_diagnostic.CA1513.severity = error
79
+
80
+ # CA1514: Avoid redundant length argument
81
+ dotnet_diagnostic.CA1514.severity = error
82
+
83
+ # CA1806: Do not ignore method results
84
+ dotnet_diagnostic.CA1806.severity = error
85
+
86
+ # CA1816: Dispose methods should call SuppressFinalize
87
+ dotnet_diagnostic.CA1816.severity = error
88
+
89
+ # CA1821: Remove empty Finalizers
90
+ dotnet_diagnostic.CA1821.severity = error
91
+
92
+ # CA1822: Mark members as static
93
+ dotnet_diagnostic.CA1822.severity = error
94
+
95
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
96
+ dotnet_diagnostic.CA1824.severity = error
97
+
98
+ # CA1825: Avoid zero-length array allocations
99
+ dotnet_diagnostic.CA1825.severity = error
100
+
101
+ # CA1826: Do not use Enumerable methods on indexable collections
102
+ dotnet_diagnostic.CA1826.severity = error
103
+
104
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
105
+ dotnet_diagnostic.CA1827.severity = error
106
+
107
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
108
+ dotnet_diagnostic.CA1828.severity = error
109
+
110
+ # CA1829: Use Length/Count property instead of Count() when available
111
+ dotnet_diagnostic.CA1829.severity = error
112
+
113
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
114
+ dotnet_diagnostic.CA1830.severity = error
115
+
116
+ # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
117
+ dotnet_diagnostic.CA1831.severity = error
118
+
119
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
120
+ dotnet_diagnostic.CA1832.severity = error
121
+
122
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
123
+ dotnet_diagnostic.CA1833.severity = error
124
+
125
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
126
+ dotnet_diagnostic.CA1834.severity = error
127
+
128
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
129
+ dotnet_diagnostic.CA1835.severity = error
130
+
131
+ # CA1836: Prefer IsEmpty over Count
132
+ dotnet_diagnostic.CA1836.severity = error
133
+
134
+ # CA1837: Use 'Environment.ProcessId'
135
+ dotnet_diagnostic.CA1837.severity = error
136
+
137
+ # CA1839: Use 'Environment.ProcessPath'
138
+ dotnet_diagnostic.CA1839.severity = error
139
+
140
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
141
+ dotnet_diagnostic.CA1840.severity = error
142
+
143
+ # CA1841: Prefer Dictionary.Contains methods
144
+ dotnet_diagnostic.CA1841.severity = error
145
+
146
+ # CA1842: Do not use 'WhenAll' with a single task
147
+ dotnet_diagnostic.CA1842.severity = error
148
+
149
+ # CA1843: Do not use 'WaitAll' with a single task
150
+ dotnet_diagnostic.CA1843.severity = error
151
+
152
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
153
+ dotnet_diagnostic.CA1844.severity = error
154
+
155
+ # CA1845: Use span-based 'string.Concat'
156
+ dotnet_diagnostic.CA1845.severity = error
157
+
158
+ # CA1846: Prefer 'AsSpan' over 'Substring'
159
+ dotnet_diagnostic.CA1846.severity = error
160
+
161
+ # CA1847: Use char literal for a single character lookup
162
+ dotnet_diagnostic.CA1847.severity = error
163
+
164
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
165
+ dotnet_diagnostic.CA1850.severity = error
166
+
167
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
168
+ dotnet_diagnostic.CA1853.severity = error
169
+
170
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
171
+ dotnet_diagnostic.CA1854.severity = error
172
+
173
+ # CA1855: Prefer 'Clear' over 'Fill'
174
+ dotnet_diagnostic.CA1855.severity = error
175
+
176
+ # CA1857: A constant is expected for the parameter
177
+ dotnet_diagnostic.CA1857.severity = error
178
+
179
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
180
+ dotnet_diagnostic.CA1858.severity = error
181
+
182
+ # CA1859: Use concrete types when possible for improved performance
183
+ dotnet_diagnostic.CA1859.severity = error
184
+
185
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
186
+ dotnet_diagnostic.CA1860.severity = error
187
+
188
+ # CA1861: Avoid constant arrays as arguments
189
+ dotnet_diagnostic.CA1861.severity = error
190
+
191
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
192
+ dotnet_diagnostic.CA1862.severity = error
193
+
194
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
195
+ dotnet_diagnostic.CA1864.severity = error
196
+
197
+ # CA1865: Use char overload
198
+ dotnet_diagnostic.CA1865.severity = error
199
+
200
+ # CA1866: Use char overload
201
+ dotnet_diagnostic.CA1866.severity = error
202
+
203
+ # CA1868: Unnecessary call to 'Contains(item)'
204
+ dotnet_diagnostic.CA1868.severity = error
205
+
206
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
207
+ dotnet_diagnostic.CA1869.severity = error
208
+
209
+ # CA1870: Use a cached 'SearchValues' instance
210
+ dotnet_diagnostic.CA1870.severity = error
211
+
212
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
213
+ dotnet_diagnostic.CA1871.severity = error
214
+
215
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
216
+ dotnet_diagnostic.CA1872.severity = error
217
+
218
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
219
+ dotnet_diagnostic.CA2009.severity = error
220
+
221
+ # CA2011: Avoid infinite recursion
222
+ dotnet_diagnostic.CA2011.severity = error
223
+
224
+ # CA2012: Use ValueTasks correctly
225
+ dotnet_diagnostic.CA2012.severity = error
226
+
227
+ # CA2013: Do not use ReferenceEquals with value types
228
+ dotnet_diagnostic.CA2013.severity = error
229
+
230
+ # CA2014: Do not use stackalloc in loops
231
+ dotnet_diagnostic.CA2014.severity = error
232
+
233
+ # CA2015: Do not define finalizers for types derived from MemoryManager<T>
234
+ dotnet_diagnostic.CA2015.severity = error
235
+
236
+ # CA2016: Forward the 'CancellationToken' parameter to methods
237
+ dotnet_diagnostic.CA2016.severity = error
238
+
239
+ # CA2017: Parameter count mismatch
240
+ dotnet_diagnostic.CA2017.severity = error
241
+
242
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
243
+ dotnet_diagnostic.CA2018.severity = error
244
+
245
+ # CA2019: Improper 'ThreadStatic' field initialization
246
+ dotnet_diagnostic.CA2019.severity = error
247
+
248
+ # CA2020: Prevent behavioral change
249
+ dotnet_diagnostic.CA2020.severity = error
250
+
251
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
252
+ dotnet_diagnostic.CA2021.severity = error
253
+
254
+ # CA2022: Avoid inexact read with 'Stream.Read'
255
+ dotnet_diagnostic.CA2022.severity = error
256
+
257
+ # CA2101: Specify marshaling for P/Invoke string arguments
258
+ dotnet_diagnostic.CA2101.severity = error
259
+
260
+ # CA2200: Rethrow to preserve stack details
261
+ dotnet_diagnostic.CA2200.severity = error
262
+
263
+ # CA2208: Instantiate argument exceptions correctly
264
+ dotnet_diagnostic.CA2208.severity = error
265
+
266
+ # CA2211: Non-constant fields should not be visible
267
+ dotnet_diagnostic.CA2211.severity = error
268
+
269
+ # CA2218: Override GetHashCode on overriding Equals
270
+ dotnet_diagnostic.CA2218.severity = error
271
+
272
+ # CA2219: Do not raise exceptions in finally clauses
273
+ dotnet_diagnostic.CA2219.severity = error
274
+
275
+ # CA2224: Override Equals on overloading operator equals
276
+ dotnet_diagnostic.CA2224.severity = error
277
+
278
+ # CA2231: Overload operator equals on overriding value type Equals
279
+ dotnet_diagnostic.CA2231.severity = error
280
+
281
+ # CA2241: Provide correct arguments to formatting methods
282
+ dotnet_diagnostic.CA2241.severity = error
283
+
284
+ # CA2242: Test for NaN correctly
285
+ dotnet_diagnostic.CA2242.severity = error
286
+
287
+ # CA2244: Do not duplicate indexed element initializations
288
+ dotnet_diagnostic.CA2244.severity = error
289
+
290
+ # CA2245: Do not assign a property to itself
291
+ dotnet_diagnostic.CA2245.severity = error
292
+
293
+ # CA2246: Assigning symbol and its member in the same statement
294
+ dotnet_diagnostic.CA2246.severity = error
295
+
296
+ # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
297
+ dotnet_diagnostic.CA2247.severity = error
298
+
299
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
300
+ dotnet_diagnostic.CA2248.severity = error
301
+
302
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
303
+ dotnet_diagnostic.CA2249.severity = error
304
+
305
+ # CA2250: Use 'ThrowIfCancellationRequested'
306
+ dotnet_diagnostic.CA2250.severity = error
307
+
308
+ # CA2253: Named placeholders should not be numeric values
309
+ dotnet_diagnostic.CA2253.severity = error
310
+
311
+ # CA2254: Template should be a static expression
312
+ dotnet_diagnostic.CA2254.severity = error
313
+
314
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
315
+ dotnet_diagnostic.CA2255.severity = error
316
+
317
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
318
+ dotnet_diagnostic.CA2256.severity = error
319
+
320
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
321
+ dotnet_diagnostic.CA2257.severity = error
322
+
323
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
324
+ dotnet_diagnostic.CA2258.severity = error
325
+
326
+ # CA2259: 'ThreadStatic' only affects static fields
327
+ dotnet_diagnostic.CA2259.severity = error
328
+
329
+ # CA2260: Use correct type parameter
330
+ dotnet_diagnostic.CA2260.severity = error
331
+
332
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
333
+ dotnet_diagnostic.CA2261.severity = error
334
+
335
+ # CA2262: Set 'MaxResponseHeadersLength' properly
336
+ dotnet_diagnostic.CA2262.severity = error
337
+
338
+ # CA2263: Prefer generic overload when type is known
339
+ dotnet_diagnostic.CA2263.severity = error
340
+
341
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
342
+ dotnet_diagnostic.CA2264.severity = error
343
+
344
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
345
+ dotnet_diagnostic.CA2265.severity = error
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_none.globalconfig ADDED
@@ -0,0 +1,510 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'None' analysis mode
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'None' analysis mode. Rules that are first released in a version later than '10.0' are disabled.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1000: Do not declare static members on generic types
12
+ dotnet_diagnostic.CA1000.severity = none
13
+
14
+ # CA1001: Types that own disposable fields should be disposable
15
+ dotnet_diagnostic.CA1001.severity = none
16
+
17
+ # CA1010: Generic interface should also be implemented
18
+ dotnet_diagnostic.CA1010.severity = none
19
+
20
+ # CA1016: Mark assemblies with assembly version
21
+ dotnet_diagnostic.CA1016.severity = none
22
+
23
+ # CA1018: Mark attributes with AttributeUsageAttribute
24
+ dotnet_diagnostic.CA1018.severity = none
25
+
26
+ # CA1036: Override methods on comparable types
27
+ dotnet_diagnostic.CA1036.severity = none
28
+
29
+ # CA1041: Provide ObsoleteAttribute message
30
+ dotnet_diagnostic.CA1041.severity = none
31
+
32
+ # CA1047: Do not declare protected member in sealed type
33
+ dotnet_diagnostic.CA1047.severity = none
34
+
35
+ # CA1050: Declare types in namespaces
36
+ dotnet_diagnostic.CA1050.severity = none
37
+
38
+ # CA1051: Do not declare visible instance fields
39
+ dotnet_diagnostic.CA1051.severity = none
40
+
41
+ # CA1061: Do not hide base class methods
42
+ dotnet_diagnostic.CA1061.severity = none
43
+
44
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
45
+ dotnet_diagnostic.CA1067.severity = none
46
+
47
+ # CA1068: CancellationToken parameters must come last
48
+ dotnet_diagnostic.CA1068.severity = none
49
+
50
+ # CA1069: Enums values should not be duplicated
51
+ dotnet_diagnostic.CA1069.severity = none
52
+
53
+ # CA1070: Do not declare event fields as virtual
54
+ dotnet_diagnostic.CA1070.severity = none
55
+
56
+ # CA1200: Avoid using cref tags with a prefix
57
+ dotnet_diagnostic.CA1200.severity = none
58
+
59
+ # CA1304: Specify CultureInfo
60
+ dotnet_diagnostic.CA1304.severity = none
61
+
62
+ # CA1305: Specify IFormatProvider
63
+ dotnet_diagnostic.CA1305.severity = none
64
+
65
+ # CA1309: Use ordinal string comparison
66
+ dotnet_diagnostic.CA1309.severity = none
67
+
68
+ # CA1310: Specify StringComparison for correctness
69
+ dotnet_diagnostic.CA1310.severity = none
70
+
71
+ # CA1311: Specify a culture or use an invariant version
72
+ dotnet_diagnostic.CA1311.severity = none
73
+
74
+ # CA1401: P/Invokes should not be visible
75
+ dotnet_diagnostic.CA1401.severity = none
76
+
77
+ # CA1416: Validate platform compatibility
78
+ dotnet_diagnostic.CA1416.severity = none
79
+
80
+ # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes
81
+ dotnet_diagnostic.CA1417.severity = none
82
+
83
+ # CA1418: Use valid platform string
84
+ dotnet_diagnostic.CA1418.severity = none
85
+
86
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
87
+ dotnet_diagnostic.CA1419.severity = none
88
+
89
+ # CA1420: Property, type, or attribute requires runtime marshalling
90
+ dotnet_diagnostic.CA1420.severity = none
91
+
92
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
93
+ dotnet_diagnostic.CA1421.severity = none
94
+
95
+ # CA1422: Validate platform compatibility
96
+ dotnet_diagnostic.CA1422.severity = none
97
+
98
+ # CA1507: Use nameof to express symbol names
99
+ dotnet_diagnostic.CA1507.severity = none
100
+
101
+ # CA1510: Use ArgumentNullException throw helper
102
+ dotnet_diagnostic.CA1510.severity = none
103
+
104
+ # CA1511: Use ArgumentException throw helper
105
+ dotnet_diagnostic.CA1511.severity = none
106
+
107
+ # CA1512: Use ArgumentOutOfRangeException throw helper
108
+ dotnet_diagnostic.CA1512.severity = none
109
+
110
+ # CA1513: Use ObjectDisposedException throw helper
111
+ dotnet_diagnostic.CA1513.severity = none
112
+
113
+ # CA1514: Avoid redundant length argument
114
+ dotnet_diagnostic.CA1514.severity = none
115
+
116
+ # CA1707: Identifiers should not contain underscores
117
+ dotnet_diagnostic.CA1707.severity = none
118
+
119
+ # CA1708: Identifiers should differ by more than case
120
+ dotnet_diagnostic.CA1708.severity = none
121
+
122
+ # CA1710: Identifiers should have correct suffix
123
+ dotnet_diagnostic.CA1710.severity = none
124
+
125
+ # CA1711: Identifiers should not have incorrect suffix
126
+ dotnet_diagnostic.CA1711.severity = none
127
+
128
+ # CA1712: Do not prefix enum values with type name
129
+ dotnet_diagnostic.CA1712.severity = none
130
+
131
+ # CA1715: Identifiers should have correct prefix
132
+ dotnet_diagnostic.CA1715.severity = none
133
+
134
+ # CA1716: Identifiers should not match keywords
135
+ dotnet_diagnostic.CA1716.severity = none
136
+
137
+ # CA1720: Identifier contains type name
138
+ dotnet_diagnostic.CA1720.severity = none
139
+
140
+ # CA1725: Parameter names should match base declaration
141
+ dotnet_diagnostic.CA1725.severity = none
142
+
143
+ # CA1727: Use PascalCase for named placeholders
144
+ dotnet_diagnostic.CA1727.severity = none
145
+
146
+ # CA1805: Do not initialize unnecessarily
147
+ dotnet_diagnostic.CA1805.severity = none
148
+
149
+ # CA1806: Do not ignore method results
150
+ dotnet_diagnostic.CA1806.severity = none
151
+
152
+ # CA1816: Dispose methods should call SuppressFinalize
153
+ dotnet_diagnostic.CA1816.severity = none
154
+
155
+ # CA1821: Remove empty Finalizers
156
+ dotnet_diagnostic.CA1821.severity = none
157
+
158
+ # CA1822: Mark members as static
159
+ dotnet_diagnostic.CA1822.severity = none
160
+
161
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
162
+ dotnet_diagnostic.CA1824.severity = none
163
+
164
+ # CA1825: Avoid zero-length array allocations
165
+ dotnet_diagnostic.CA1825.severity = none
166
+
167
+ # CA1826: Do not use Enumerable methods on indexable collections
168
+ dotnet_diagnostic.CA1826.severity = none
169
+
170
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
171
+ dotnet_diagnostic.CA1827.severity = none
172
+
173
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
174
+ dotnet_diagnostic.CA1828.severity = none
175
+
176
+ # CA1829: Use Length/Count property instead of Count() when available
177
+ dotnet_diagnostic.CA1829.severity = none
178
+
179
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
180
+ dotnet_diagnostic.CA1830.severity = none
181
+
182
+ # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
183
+ dotnet_diagnostic.CA1831.severity = none
184
+
185
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
186
+ dotnet_diagnostic.CA1832.severity = none
187
+
188
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
189
+ dotnet_diagnostic.CA1833.severity = none
190
+
191
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
192
+ dotnet_diagnostic.CA1834.severity = none
193
+
194
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
195
+ dotnet_diagnostic.CA1835.severity = none
196
+
197
+ # CA1836: Prefer IsEmpty over Count
198
+ dotnet_diagnostic.CA1836.severity = none
199
+
200
+ # CA1837: Use 'Environment.ProcessId'
201
+ dotnet_diagnostic.CA1837.severity = none
202
+
203
+ # CA1838: Avoid 'StringBuilder' parameters for P/Invokes
204
+ dotnet_diagnostic.CA1838.severity = none
205
+
206
+ # CA1839: Use 'Environment.ProcessPath'
207
+ dotnet_diagnostic.CA1839.severity = none
208
+
209
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
210
+ dotnet_diagnostic.CA1840.severity = none
211
+
212
+ # CA1841: Prefer Dictionary.Contains methods
213
+ dotnet_diagnostic.CA1841.severity = none
214
+
215
+ # CA1842: Do not use 'WhenAll' with a single task
216
+ dotnet_diagnostic.CA1842.severity = none
217
+
218
+ # CA1843: Do not use 'WaitAll' with a single task
219
+ dotnet_diagnostic.CA1843.severity = none
220
+
221
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
222
+ dotnet_diagnostic.CA1844.severity = none
223
+
224
+ # CA1845: Use span-based 'string.Concat'
225
+ dotnet_diagnostic.CA1845.severity = none
226
+
227
+ # CA1846: Prefer 'AsSpan' over 'Substring'
228
+ dotnet_diagnostic.CA1846.severity = none
229
+
230
+ # CA1847: Use char literal for a single character lookup
231
+ dotnet_diagnostic.CA1847.severity = none
232
+
233
+ # CA1848: Use the LoggerMessage delegates
234
+ dotnet_diagnostic.CA1848.severity = none
235
+
236
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
237
+ dotnet_diagnostic.CA1850.severity = none
238
+
239
+ # CA1852: Seal internal types
240
+ dotnet_diagnostic.CA1852.severity = none
241
+
242
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
243
+ dotnet_diagnostic.CA1853.severity = none
244
+
245
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
246
+ dotnet_diagnostic.CA1854.severity = none
247
+
248
+ # CA1855: Prefer 'Clear' over 'Fill'
249
+ dotnet_diagnostic.CA1855.severity = none
250
+
251
+ # CA1856: Incorrect usage of ConstantExpected attribute
252
+ dotnet_diagnostic.CA1856.severity = none
253
+
254
+ # CA1857: A constant is expected for the parameter
255
+ dotnet_diagnostic.CA1857.severity = none
256
+
257
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
258
+ dotnet_diagnostic.CA1858.severity = none
259
+
260
+ # CA1859: Use concrete types when possible for improved performance
261
+ dotnet_diagnostic.CA1859.severity = none
262
+
263
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
264
+ dotnet_diagnostic.CA1860.severity = none
265
+
266
+ # CA1861: Avoid constant arrays as arguments
267
+ dotnet_diagnostic.CA1861.severity = none
268
+
269
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
270
+ dotnet_diagnostic.CA1862.severity = none
271
+
272
+ # CA1863: Use 'CompositeFormat'
273
+ dotnet_diagnostic.CA1863.severity = none
274
+
275
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
276
+ dotnet_diagnostic.CA1864.severity = none
277
+
278
+ # CA1865: Use char overload
279
+ dotnet_diagnostic.CA1865.severity = none
280
+
281
+ # CA1866: Use char overload
282
+ dotnet_diagnostic.CA1866.severity = none
283
+
284
+ # CA1868: Unnecessary call to 'Contains(item)'
285
+ dotnet_diagnostic.CA1868.severity = none
286
+
287
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
288
+ dotnet_diagnostic.CA1869.severity = none
289
+
290
+ # CA1870: Use a cached 'SearchValues' instance
291
+ dotnet_diagnostic.CA1870.severity = none
292
+
293
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
294
+ dotnet_diagnostic.CA1871.severity = none
295
+
296
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
297
+ dotnet_diagnostic.CA1872.severity = none
298
+
299
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
300
+ dotnet_diagnostic.CA2009.severity = none
301
+
302
+ # CA2011: Avoid infinite recursion
303
+ dotnet_diagnostic.CA2011.severity = none
304
+
305
+ # CA2012: Use ValueTasks correctly
306
+ dotnet_diagnostic.CA2012.severity = none
307
+
308
+ # CA2013: Do not use ReferenceEquals with value types
309
+ dotnet_diagnostic.CA2013.severity = none
310
+
311
+ # CA2014: Do not use stackalloc in loops
312
+ dotnet_diagnostic.CA2014.severity = none
313
+
314
+ # CA2015: Do not define finalizers for types derived from MemoryManager<T>
315
+ dotnet_diagnostic.CA2015.severity = none
316
+
317
+ # CA2016: Forward the 'CancellationToken' parameter to methods
318
+ dotnet_diagnostic.CA2016.severity = none
319
+
320
+ # CA2017: Parameter count mismatch
321
+ dotnet_diagnostic.CA2017.severity = none
322
+
323
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
324
+ dotnet_diagnostic.CA2018.severity = none
325
+
326
+ # CA2019: Improper 'ThreadStatic' field initialization
327
+ dotnet_diagnostic.CA2019.severity = none
328
+
329
+ # CA2020: Prevent behavioral change
330
+ dotnet_diagnostic.CA2020.severity = none
331
+
332
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
333
+ dotnet_diagnostic.CA2021.severity = none
334
+
335
+ # CA2022: Avoid inexact read with 'Stream.Read'
336
+ dotnet_diagnostic.CA2022.severity = none
337
+
338
+ # CA2101: Specify marshaling for P/Invoke string arguments
339
+ dotnet_diagnostic.CA2101.severity = none
340
+
341
+ # CA2200: Rethrow to preserve stack details
342
+ dotnet_diagnostic.CA2200.severity = none
343
+
344
+ # CA2201: Do not raise reserved exception types
345
+ dotnet_diagnostic.CA2201.severity = none
346
+
347
+ # CA2208: Instantiate argument exceptions correctly
348
+ dotnet_diagnostic.CA2208.severity = none
349
+
350
+ # CA2211: Non-constant fields should not be visible
351
+ dotnet_diagnostic.CA2211.severity = none
352
+
353
+ # CA2215: Dispose methods should call base class dispose
354
+ dotnet_diagnostic.CA2215.severity = none
355
+
356
+ # CA2218: Override GetHashCode on overriding Equals
357
+ dotnet_diagnostic.CA2218.severity = none
358
+
359
+ # CA2219: Do not raise exceptions in finally clauses
360
+ dotnet_diagnostic.CA2219.severity = none
361
+
362
+ # CA2224: Override Equals on overloading operator equals
363
+ dotnet_diagnostic.CA2224.severity = none
364
+
365
+ # CA2231: Overload operator equals on overriding value type Equals
366
+ dotnet_diagnostic.CA2231.severity = none
367
+
368
+ # CA2241: Provide correct arguments to formatting methods
369
+ dotnet_diagnostic.CA2241.severity = none
370
+
371
+ # CA2242: Test for NaN correctly
372
+ dotnet_diagnostic.CA2242.severity = none
373
+
374
+ # CA2244: Do not duplicate indexed element initializations
375
+ dotnet_diagnostic.CA2244.severity = none
376
+
377
+ # CA2245: Do not assign a property to itself
378
+ dotnet_diagnostic.CA2245.severity = none
379
+
380
+ # CA2246: Assigning symbol and its member in the same statement
381
+ dotnet_diagnostic.CA2246.severity = none
382
+
383
+ # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
384
+ dotnet_diagnostic.CA2247.severity = none
385
+
386
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
387
+ dotnet_diagnostic.CA2248.severity = none
388
+
389
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
390
+ dotnet_diagnostic.CA2249.severity = none
391
+
392
+ # CA2250: Use 'ThrowIfCancellationRequested'
393
+ dotnet_diagnostic.CA2250.severity = none
394
+
395
+ # CA2251: Use 'string.Equals'
396
+ dotnet_diagnostic.CA2251.severity = none
397
+
398
+ # CA2252: This API requires opting into preview features
399
+ dotnet_diagnostic.CA2252.severity = none
400
+
401
+ # CA2253: Named placeholders should not be numeric values
402
+ dotnet_diagnostic.CA2253.severity = none
403
+
404
+ # CA2254: Template should be a static expression
405
+ dotnet_diagnostic.CA2254.severity = none
406
+
407
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
408
+ dotnet_diagnostic.CA2255.severity = none
409
+
410
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
411
+ dotnet_diagnostic.CA2256.severity = none
412
+
413
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
414
+ dotnet_diagnostic.CA2257.severity = none
415
+
416
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
417
+ dotnet_diagnostic.CA2258.severity = none
418
+
419
+ # CA2259: 'ThreadStatic' only affects static fields
420
+ dotnet_diagnostic.CA2259.severity = none
421
+
422
+ # CA2260: Use correct type parameter
423
+ dotnet_diagnostic.CA2260.severity = none
424
+
425
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
426
+ dotnet_diagnostic.CA2261.severity = none
427
+
428
+ # CA2262: Set 'MaxResponseHeadersLength' properly
429
+ dotnet_diagnostic.CA2262.severity = none
430
+
431
+ # CA2263: Prefer generic overload when type is known
432
+ dotnet_diagnostic.CA2263.severity = none
433
+
434
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
435
+ dotnet_diagnostic.CA2264.severity = none
436
+
437
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
438
+ dotnet_diagnostic.CA2265.severity = none
439
+
440
+ # CA3061: Do Not Add Schema By URL
441
+ dotnet_diagnostic.CA3061.severity = none
442
+
443
+ # CA3075: Insecure DTD processing in XML
444
+ dotnet_diagnostic.CA3075.severity = none
445
+
446
+ # CA3076: Insecure XSLT script processing
447
+ dotnet_diagnostic.CA3076.severity = none
448
+
449
+ # CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader
450
+ dotnet_diagnostic.CA3077.severity = none
451
+
452
+ # CA3147: Mark Verb Handlers With Validate Antiforgery Token
453
+ dotnet_diagnostic.CA3147.severity = none
454
+
455
+ # CA5350: Do Not Use Weak Cryptographic Algorithms
456
+ dotnet_diagnostic.CA5350.severity = none
457
+
458
+ # CA5351: Do Not Use Broken Cryptographic Algorithms
459
+ dotnet_diagnostic.CA5351.severity = none
460
+
461
+ # CA5359: Do Not Disable Certificate Validation
462
+ dotnet_diagnostic.CA5359.severity = none
463
+
464
+ # CA5360: Do Not Call Dangerous Methods In Deserialization
465
+ dotnet_diagnostic.CA5360.severity = none
466
+
467
+ # CA5363: Do Not Disable Request Validation
468
+ dotnet_diagnostic.CA5363.severity = none
469
+
470
+ # CA5364: Do Not Use Deprecated Security Protocols
471
+ dotnet_diagnostic.CA5364.severity = none
472
+
473
+ # CA5365: Do Not Disable HTTP Header Checking
474
+ dotnet_diagnostic.CA5365.severity = none
475
+
476
+ # CA5366: Use XmlReader for 'DataSet.ReadXml()'
477
+ dotnet_diagnostic.CA5366.severity = none
478
+
479
+ # CA5368: Set ViewStateUserKey For Classes Derived From Page
480
+ dotnet_diagnostic.CA5368.severity = none
481
+
482
+ # CA5369: Use XmlReader for 'XmlSerializer.Deserialize()'
483
+ dotnet_diagnostic.CA5369.severity = none
484
+
485
+ # CA5370: Use XmlReader for XmlValidatingReader constructor
486
+ dotnet_diagnostic.CA5370.severity = none
487
+
488
+ # CA5371: Use XmlReader for 'XmlSchema.Read()'
489
+ dotnet_diagnostic.CA5371.severity = none
490
+
491
+ # CA5372: Use XmlReader for XPathDocument constructor
492
+ dotnet_diagnostic.CA5372.severity = none
493
+
494
+ # CA5373: Do not use obsolete key derivation function
495
+ dotnet_diagnostic.CA5373.severity = none
496
+
497
+ # CA5374: Do Not Use XslTransform
498
+ dotnet_diagnostic.CA5374.severity = none
499
+
500
+ # CA5379: Ensure Key Derivation Function algorithm is sufficiently strong
501
+ dotnet_diagnostic.CA5379.severity = none
502
+
503
+ # CA5384: Do Not Use Digital Signature Algorithm (DSA)
504
+ dotnet_diagnostic.CA5384.severity = none
505
+
506
+ # CA5385: Use Rivest-Shamir-Adleman (RSA) Algorithm With Sufficient Key Size
507
+ dotnet_diagnostic.CA5385.severity = none
508
+
509
+ # CA5397: Do not use deprecated SslProtocols values
510
+ dotnet_diagnostic.CA5397.severity = none
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_none_warnaserror.globalconfig ADDED
@@ -0,0 +1,510 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'None' analysis mode escalated to 'error' severity
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'None' analysis mode. Rules that are first released in a version later than '10.0' are disabled. Enabled rules with 'warning' severity are escalated to 'error' severity to respect 'CodeAnalysisTreatWarningsAsErrors' MSBuild property.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1000: Do not declare static members on generic types
12
+ dotnet_diagnostic.CA1000.severity = none
13
+
14
+ # CA1001: Types that own disposable fields should be disposable
15
+ dotnet_diagnostic.CA1001.severity = none
16
+
17
+ # CA1010: Generic interface should also be implemented
18
+ dotnet_diagnostic.CA1010.severity = none
19
+
20
+ # CA1016: Mark assemblies with assembly version
21
+ dotnet_diagnostic.CA1016.severity = none
22
+
23
+ # CA1018: Mark attributes with AttributeUsageAttribute
24
+ dotnet_diagnostic.CA1018.severity = none
25
+
26
+ # CA1036: Override methods on comparable types
27
+ dotnet_diagnostic.CA1036.severity = none
28
+
29
+ # CA1041: Provide ObsoleteAttribute message
30
+ dotnet_diagnostic.CA1041.severity = none
31
+
32
+ # CA1047: Do not declare protected member in sealed type
33
+ dotnet_diagnostic.CA1047.severity = none
34
+
35
+ # CA1050: Declare types in namespaces
36
+ dotnet_diagnostic.CA1050.severity = none
37
+
38
+ # CA1051: Do not declare visible instance fields
39
+ dotnet_diagnostic.CA1051.severity = none
40
+
41
+ # CA1061: Do not hide base class methods
42
+ dotnet_diagnostic.CA1061.severity = none
43
+
44
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
45
+ dotnet_diagnostic.CA1067.severity = none
46
+
47
+ # CA1068: CancellationToken parameters must come last
48
+ dotnet_diagnostic.CA1068.severity = none
49
+
50
+ # CA1069: Enums values should not be duplicated
51
+ dotnet_diagnostic.CA1069.severity = none
52
+
53
+ # CA1070: Do not declare event fields as virtual
54
+ dotnet_diagnostic.CA1070.severity = none
55
+
56
+ # CA1200: Avoid using cref tags with a prefix
57
+ dotnet_diagnostic.CA1200.severity = none
58
+
59
+ # CA1304: Specify CultureInfo
60
+ dotnet_diagnostic.CA1304.severity = none
61
+
62
+ # CA1305: Specify IFormatProvider
63
+ dotnet_diagnostic.CA1305.severity = none
64
+
65
+ # CA1309: Use ordinal string comparison
66
+ dotnet_diagnostic.CA1309.severity = none
67
+
68
+ # CA1310: Specify StringComparison for correctness
69
+ dotnet_diagnostic.CA1310.severity = none
70
+
71
+ # CA1311: Specify a culture or use an invariant version
72
+ dotnet_diagnostic.CA1311.severity = none
73
+
74
+ # CA1401: P/Invokes should not be visible
75
+ dotnet_diagnostic.CA1401.severity = none
76
+
77
+ # CA1416: Validate platform compatibility
78
+ dotnet_diagnostic.CA1416.severity = none
79
+
80
+ # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes
81
+ dotnet_diagnostic.CA1417.severity = none
82
+
83
+ # CA1418: Use valid platform string
84
+ dotnet_diagnostic.CA1418.severity = none
85
+
86
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
87
+ dotnet_diagnostic.CA1419.severity = none
88
+
89
+ # CA1420: Property, type, or attribute requires runtime marshalling
90
+ dotnet_diagnostic.CA1420.severity = none
91
+
92
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
93
+ dotnet_diagnostic.CA1421.severity = none
94
+
95
+ # CA1422: Validate platform compatibility
96
+ dotnet_diagnostic.CA1422.severity = none
97
+
98
+ # CA1507: Use nameof to express symbol names
99
+ dotnet_diagnostic.CA1507.severity = none
100
+
101
+ # CA1510: Use ArgumentNullException throw helper
102
+ dotnet_diagnostic.CA1510.severity = none
103
+
104
+ # CA1511: Use ArgumentException throw helper
105
+ dotnet_diagnostic.CA1511.severity = none
106
+
107
+ # CA1512: Use ArgumentOutOfRangeException throw helper
108
+ dotnet_diagnostic.CA1512.severity = none
109
+
110
+ # CA1513: Use ObjectDisposedException throw helper
111
+ dotnet_diagnostic.CA1513.severity = none
112
+
113
+ # CA1514: Avoid redundant length argument
114
+ dotnet_diagnostic.CA1514.severity = none
115
+
116
+ # CA1707: Identifiers should not contain underscores
117
+ dotnet_diagnostic.CA1707.severity = none
118
+
119
+ # CA1708: Identifiers should differ by more than case
120
+ dotnet_diagnostic.CA1708.severity = none
121
+
122
+ # CA1710: Identifiers should have correct suffix
123
+ dotnet_diagnostic.CA1710.severity = none
124
+
125
+ # CA1711: Identifiers should not have incorrect suffix
126
+ dotnet_diagnostic.CA1711.severity = none
127
+
128
+ # CA1712: Do not prefix enum values with type name
129
+ dotnet_diagnostic.CA1712.severity = none
130
+
131
+ # CA1715: Identifiers should have correct prefix
132
+ dotnet_diagnostic.CA1715.severity = none
133
+
134
+ # CA1716: Identifiers should not match keywords
135
+ dotnet_diagnostic.CA1716.severity = none
136
+
137
+ # CA1720: Identifier contains type name
138
+ dotnet_diagnostic.CA1720.severity = none
139
+
140
+ # CA1725: Parameter names should match base declaration
141
+ dotnet_diagnostic.CA1725.severity = none
142
+
143
+ # CA1727: Use PascalCase for named placeholders
144
+ dotnet_diagnostic.CA1727.severity = none
145
+
146
+ # CA1805: Do not initialize unnecessarily
147
+ dotnet_diagnostic.CA1805.severity = none
148
+
149
+ # CA1806: Do not ignore method results
150
+ dotnet_diagnostic.CA1806.severity = none
151
+
152
+ # CA1816: Dispose methods should call SuppressFinalize
153
+ dotnet_diagnostic.CA1816.severity = none
154
+
155
+ # CA1821: Remove empty Finalizers
156
+ dotnet_diagnostic.CA1821.severity = none
157
+
158
+ # CA1822: Mark members as static
159
+ dotnet_diagnostic.CA1822.severity = none
160
+
161
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
162
+ dotnet_diagnostic.CA1824.severity = none
163
+
164
+ # CA1825: Avoid zero-length array allocations
165
+ dotnet_diagnostic.CA1825.severity = none
166
+
167
+ # CA1826: Do not use Enumerable methods on indexable collections
168
+ dotnet_diagnostic.CA1826.severity = none
169
+
170
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
171
+ dotnet_diagnostic.CA1827.severity = none
172
+
173
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
174
+ dotnet_diagnostic.CA1828.severity = none
175
+
176
+ # CA1829: Use Length/Count property instead of Count() when available
177
+ dotnet_diagnostic.CA1829.severity = none
178
+
179
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
180
+ dotnet_diagnostic.CA1830.severity = none
181
+
182
+ # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
183
+ dotnet_diagnostic.CA1831.severity = none
184
+
185
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
186
+ dotnet_diagnostic.CA1832.severity = none
187
+
188
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
189
+ dotnet_diagnostic.CA1833.severity = none
190
+
191
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
192
+ dotnet_diagnostic.CA1834.severity = none
193
+
194
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
195
+ dotnet_diagnostic.CA1835.severity = none
196
+
197
+ # CA1836: Prefer IsEmpty over Count
198
+ dotnet_diagnostic.CA1836.severity = none
199
+
200
+ # CA1837: Use 'Environment.ProcessId'
201
+ dotnet_diagnostic.CA1837.severity = none
202
+
203
+ # CA1838: Avoid 'StringBuilder' parameters for P/Invokes
204
+ dotnet_diagnostic.CA1838.severity = none
205
+
206
+ # CA1839: Use 'Environment.ProcessPath'
207
+ dotnet_diagnostic.CA1839.severity = none
208
+
209
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
210
+ dotnet_diagnostic.CA1840.severity = none
211
+
212
+ # CA1841: Prefer Dictionary.Contains methods
213
+ dotnet_diagnostic.CA1841.severity = none
214
+
215
+ # CA1842: Do not use 'WhenAll' with a single task
216
+ dotnet_diagnostic.CA1842.severity = none
217
+
218
+ # CA1843: Do not use 'WaitAll' with a single task
219
+ dotnet_diagnostic.CA1843.severity = none
220
+
221
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
222
+ dotnet_diagnostic.CA1844.severity = none
223
+
224
+ # CA1845: Use span-based 'string.Concat'
225
+ dotnet_diagnostic.CA1845.severity = none
226
+
227
+ # CA1846: Prefer 'AsSpan' over 'Substring'
228
+ dotnet_diagnostic.CA1846.severity = none
229
+
230
+ # CA1847: Use char literal for a single character lookup
231
+ dotnet_diagnostic.CA1847.severity = none
232
+
233
+ # CA1848: Use the LoggerMessage delegates
234
+ dotnet_diagnostic.CA1848.severity = none
235
+
236
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
237
+ dotnet_diagnostic.CA1850.severity = none
238
+
239
+ # CA1852: Seal internal types
240
+ dotnet_diagnostic.CA1852.severity = none
241
+
242
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
243
+ dotnet_diagnostic.CA1853.severity = none
244
+
245
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
246
+ dotnet_diagnostic.CA1854.severity = none
247
+
248
+ # CA1855: Prefer 'Clear' over 'Fill'
249
+ dotnet_diagnostic.CA1855.severity = none
250
+
251
+ # CA1856: Incorrect usage of ConstantExpected attribute
252
+ dotnet_diagnostic.CA1856.severity = none
253
+
254
+ # CA1857: A constant is expected for the parameter
255
+ dotnet_diagnostic.CA1857.severity = none
256
+
257
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
258
+ dotnet_diagnostic.CA1858.severity = none
259
+
260
+ # CA1859: Use concrete types when possible for improved performance
261
+ dotnet_diagnostic.CA1859.severity = none
262
+
263
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
264
+ dotnet_diagnostic.CA1860.severity = none
265
+
266
+ # CA1861: Avoid constant arrays as arguments
267
+ dotnet_diagnostic.CA1861.severity = none
268
+
269
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
270
+ dotnet_diagnostic.CA1862.severity = none
271
+
272
+ # CA1863: Use 'CompositeFormat'
273
+ dotnet_diagnostic.CA1863.severity = none
274
+
275
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
276
+ dotnet_diagnostic.CA1864.severity = none
277
+
278
+ # CA1865: Use char overload
279
+ dotnet_diagnostic.CA1865.severity = none
280
+
281
+ # CA1866: Use char overload
282
+ dotnet_diagnostic.CA1866.severity = none
283
+
284
+ # CA1868: Unnecessary call to 'Contains(item)'
285
+ dotnet_diagnostic.CA1868.severity = none
286
+
287
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
288
+ dotnet_diagnostic.CA1869.severity = none
289
+
290
+ # CA1870: Use a cached 'SearchValues' instance
291
+ dotnet_diagnostic.CA1870.severity = none
292
+
293
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
294
+ dotnet_diagnostic.CA1871.severity = none
295
+
296
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
297
+ dotnet_diagnostic.CA1872.severity = none
298
+
299
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
300
+ dotnet_diagnostic.CA2009.severity = none
301
+
302
+ # CA2011: Avoid infinite recursion
303
+ dotnet_diagnostic.CA2011.severity = none
304
+
305
+ # CA2012: Use ValueTasks correctly
306
+ dotnet_diagnostic.CA2012.severity = none
307
+
308
+ # CA2013: Do not use ReferenceEquals with value types
309
+ dotnet_diagnostic.CA2013.severity = none
310
+
311
+ # CA2014: Do not use stackalloc in loops
312
+ dotnet_diagnostic.CA2014.severity = none
313
+
314
+ # CA2015: Do not define finalizers for types derived from MemoryManager<T>
315
+ dotnet_diagnostic.CA2015.severity = none
316
+
317
+ # CA2016: Forward the 'CancellationToken' parameter to methods
318
+ dotnet_diagnostic.CA2016.severity = none
319
+
320
+ # CA2017: Parameter count mismatch
321
+ dotnet_diagnostic.CA2017.severity = none
322
+
323
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
324
+ dotnet_diagnostic.CA2018.severity = none
325
+
326
+ # CA2019: Improper 'ThreadStatic' field initialization
327
+ dotnet_diagnostic.CA2019.severity = none
328
+
329
+ # CA2020: Prevent behavioral change
330
+ dotnet_diagnostic.CA2020.severity = none
331
+
332
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
333
+ dotnet_diagnostic.CA2021.severity = none
334
+
335
+ # CA2022: Avoid inexact read with 'Stream.Read'
336
+ dotnet_diagnostic.CA2022.severity = none
337
+
338
+ # CA2101: Specify marshaling for P/Invoke string arguments
339
+ dotnet_diagnostic.CA2101.severity = none
340
+
341
+ # CA2200: Rethrow to preserve stack details
342
+ dotnet_diagnostic.CA2200.severity = none
343
+
344
+ # CA2201: Do not raise reserved exception types
345
+ dotnet_diagnostic.CA2201.severity = none
346
+
347
+ # CA2208: Instantiate argument exceptions correctly
348
+ dotnet_diagnostic.CA2208.severity = none
349
+
350
+ # CA2211: Non-constant fields should not be visible
351
+ dotnet_diagnostic.CA2211.severity = none
352
+
353
+ # CA2215: Dispose methods should call base class dispose
354
+ dotnet_diagnostic.CA2215.severity = none
355
+
356
+ # CA2218: Override GetHashCode on overriding Equals
357
+ dotnet_diagnostic.CA2218.severity = none
358
+
359
+ # CA2219: Do not raise exceptions in finally clauses
360
+ dotnet_diagnostic.CA2219.severity = none
361
+
362
+ # CA2224: Override Equals on overloading operator equals
363
+ dotnet_diagnostic.CA2224.severity = none
364
+
365
+ # CA2231: Overload operator equals on overriding value type Equals
366
+ dotnet_diagnostic.CA2231.severity = none
367
+
368
+ # CA2241: Provide correct arguments to formatting methods
369
+ dotnet_diagnostic.CA2241.severity = none
370
+
371
+ # CA2242: Test for NaN correctly
372
+ dotnet_diagnostic.CA2242.severity = none
373
+
374
+ # CA2244: Do not duplicate indexed element initializations
375
+ dotnet_diagnostic.CA2244.severity = none
376
+
377
+ # CA2245: Do not assign a property to itself
378
+ dotnet_diagnostic.CA2245.severity = none
379
+
380
+ # CA2246: Assigning symbol and its member in the same statement
381
+ dotnet_diagnostic.CA2246.severity = none
382
+
383
+ # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
384
+ dotnet_diagnostic.CA2247.severity = none
385
+
386
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
387
+ dotnet_diagnostic.CA2248.severity = none
388
+
389
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
390
+ dotnet_diagnostic.CA2249.severity = none
391
+
392
+ # CA2250: Use 'ThrowIfCancellationRequested'
393
+ dotnet_diagnostic.CA2250.severity = none
394
+
395
+ # CA2251: Use 'string.Equals'
396
+ dotnet_diagnostic.CA2251.severity = none
397
+
398
+ # CA2252: This API requires opting into preview features
399
+ dotnet_diagnostic.CA2252.severity = none
400
+
401
+ # CA2253: Named placeholders should not be numeric values
402
+ dotnet_diagnostic.CA2253.severity = none
403
+
404
+ # CA2254: Template should be a static expression
405
+ dotnet_diagnostic.CA2254.severity = none
406
+
407
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
408
+ dotnet_diagnostic.CA2255.severity = none
409
+
410
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
411
+ dotnet_diagnostic.CA2256.severity = none
412
+
413
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
414
+ dotnet_diagnostic.CA2257.severity = none
415
+
416
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
417
+ dotnet_diagnostic.CA2258.severity = none
418
+
419
+ # CA2259: 'ThreadStatic' only affects static fields
420
+ dotnet_diagnostic.CA2259.severity = none
421
+
422
+ # CA2260: Use correct type parameter
423
+ dotnet_diagnostic.CA2260.severity = none
424
+
425
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
426
+ dotnet_diagnostic.CA2261.severity = none
427
+
428
+ # CA2262: Set 'MaxResponseHeadersLength' properly
429
+ dotnet_diagnostic.CA2262.severity = none
430
+
431
+ # CA2263: Prefer generic overload when type is known
432
+ dotnet_diagnostic.CA2263.severity = none
433
+
434
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
435
+ dotnet_diagnostic.CA2264.severity = none
436
+
437
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
438
+ dotnet_diagnostic.CA2265.severity = none
439
+
440
+ # CA3061: Do Not Add Schema By URL
441
+ dotnet_diagnostic.CA3061.severity = none
442
+
443
+ # CA3075: Insecure DTD processing in XML
444
+ dotnet_diagnostic.CA3075.severity = none
445
+
446
+ # CA3076: Insecure XSLT script processing
447
+ dotnet_diagnostic.CA3076.severity = none
448
+
449
+ # CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader
450
+ dotnet_diagnostic.CA3077.severity = none
451
+
452
+ # CA3147: Mark Verb Handlers With Validate Antiforgery Token
453
+ dotnet_diagnostic.CA3147.severity = none
454
+
455
+ # CA5350: Do Not Use Weak Cryptographic Algorithms
456
+ dotnet_diagnostic.CA5350.severity = none
457
+
458
+ # CA5351: Do Not Use Broken Cryptographic Algorithms
459
+ dotnet_diagnostic.CA5351.severity = none
460
+
461
+ # CA5359: Do Not Disable Certificate Validation
462
+ dotnet_diagnostic.CA5359.severity = none
463
+
464
+ # CA5360: Do Not Call Dangerous Methods In Deserialization
465
+ dotnet_diagnostic.CA5360.severity = none
466
+
467
+ # CA5363: Do Not Disable Request Validation
468
+ dotnet_diagnostic.CA5363.severity = none
469
+
470
+ # CA5364: Do Not Use Deprecated Security Protocols
471
+ dotnet_diagnostic.CA5364.severity = none
472
+
473
+ # CA5365: Do Not Disable HTTP Header Checking
474
+ dotnet_diagnostic.CA5365.severity = none
475
+
476
+ # CA5366: Use XmlReader for 'DataSet.ReadXml()'
477
+ dotnet_diagnostic.CA5366.severity = none
478
+
479
+ # CA5368: Set ViewStateUserKey For Classes Derived From Page
480
+ dotnet_diagnostic.CA5368.severity = none
481
+
482
+ # CA5369: Use XmlReader for 'XmlSerializer.Deserialize()'
483
+ dotnet_diagnostic.CA5369.severity = none
484
+
485
+ # CA5370: Use XmlReader for XmlValidatingReader constructor
486
+ dotnet_diagnostic.CA5370.severity = none
487
+
488
+ # CA5371: Use XmlReader for 'XmlSchema.Read()'
489
+ dotnet_diagnostic.CA5371.severity = none
490
+
491
+ # CA5372: Use XmlReader for XPathDocument constructor
492
+ dotnet_diagnostic.CA5372.severity = none
493
+
494
+ # CA5373: Do not use obsolete key derivation function
495
+ dotnet_diagnostic.CA5373.severity = none
496
+
497
+ # CA5374: Do Not Use XslTransform
498
+ dotnet_diagnostic.CA5374.severity = none
499
+
500
+ # CA5379: Ensure Key Derivation Function algorithm is sufficiently strong
501
+ dotnet_diagnostic.CA5379.severity = none
502
+
503
+ # CA5384: Do Not Use Digital Signature Algorithm (DSA)
504
+ dotnet_diagnostic.CA5384.severity = none
505
+
506
+ # CA5385: Use Rivest-Shamir-Adleman (RSA) Algorithm With Sufficient Key Size
507
+ dotnet_diagnostic.CA5385.severity = none
508
+
509
+ # CA5397: Do not use deprecated SslProtocols values
510
+ dotnet_diagnostic.CA5397.severity = none
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_recommended.globalconfig ADDED
@@ -0,0 +1,435 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'Recommended' analysis mode
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'Recommended' analysis mode. Rules that are first released in a version later than '10.0' are disabled.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1000: Do not declare static members on generic types
12
+ dotnet_diagnostic.CA1000.severity = warning
13
+
14
+ # CA1001: Types that own disposable fields should be disposable
15
+ dotnet_diagnostic.CA1001.severity = warning
16
+
17
+ # CA1010: Generic interface should also be implemented
18
+ dotnet_diagnostic.CA1010.severity = warning
19
+
20
+ # CA1016: Mark assemblies with assembly version
21
+ dotnet_diagnostic.CA1016.severity = warning
22
+
23
+ # CA1018: Mark attributes with AttributeUsageAttribute
24
+ dotnet_diagnostic.CA1018.severity = warning
25
+
26
+ # CA1036: Override methods on comparable types
27
+ dotnet_diagnostic.CA1036.severity = warning
28
+
29
+ # CA1041: Provide ObsoleteAttribute message
30
+ dotnet_diagnostic.CA1041.severity = warning
31
+
32
+ # CA1047: Do not declare protected member in sealed type
33
+ dotnet_diagnostic.CA1047.severity = warning
34
+
35
+ # CA1050: Declare types in namespaces
36
+ dotnet_diagnostic.CA1050.severity = warning
37
+
38
+ # CA1051: Do not declare visible instance fields
39
+ dotnet_diagnostic.CA1051.severity = warning
40
+
41
+ # CA1061: Do not hide base class methods
42
+ dotnet_diagnostic.CA1061.severity = warning
43
+
44
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
45
+ dotnet_diagnostic.CA1067.severity = warning
46
+
47
+ # CA1068: CancellationToken parameters must come last
48
+ dotnet_diagnostic.CA1068.severity = warning
49
+
50
+ # CA1069: Enums values should not be duplicated
51
+ dotnet_diagnostic.CA1069.severity = warning
52
+
53
+ # CA1070: Do not declare event fields as virtual
54
+ dotnet_diagnostic.CA1070.severity = warning
55
+
56
+ # CA1200: Avoid using cref tags with a prefix
57
+ dotnet_diagnostic.CA1200.severity = warning
58
+
59
+ # CA1304: Specify CultureInfo
60
+ dotnet_diagnostic.CA1304.severity = warning
61
+
62
+ # CA1305: Specify IFormatProvider
63
+ dotnet_diagnostic.CA1305.severity = warning
64
+
65
+ # CA1309: Use ordinal string comparison
66
+ dotnet_diagnostic.CA1309.severity = warning
67
+
68
+ # CA1310: Specify StringComparison for correctness
69
+ dotnet_diagnostic.CA1310.severity = warning
70
+
71
+ # CA1311: Specify a culture or use an invariant version
72
+ dotnet_diagnostic.CA1311.severity = warning
73
+
74
+ # CA1401: P/Invokes should not be visible
75
+ dotnet_diagnostic.CA1401.severity = warning
76
+
77
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
78
+ dotnet_diagnostic.CA1419.severity = warning
79
+
80
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
81
+ dotnet_diagnostic.CA1421.severity = warning
82
+
83
+ # CA1507: Use nameof to express symbol names
84
+ dotnet_diagnostic.CA1507.severity = warning
85
+
86
+ # CA1510: Use ArgumentNullException throw helper
87
+ dotnet_diagnostic.CA1510.severity = warning
88
+
89
+ # CA1511: Use ArgumentException throw helper
90
+ dotnet_diagnostic.CA1511.severity = warning
91
+
92
+ # CA1512: Use ArgumentOutOfRangeException throw helper
93
+ dotnet_diagnostic.CA1512.severity = warning
94
+
95
+ # CA1513: Use ObjectDisposedException throw helper
96
+ dotnet_diagnostic.CA1513.severity = warning
97
+
98
+ # CA1514: Avoid redundant length argument
99
+ dotnet_diagnostic.CA1514.severity = warning
100
+
101
+ # CA1707: Identifiers should not contain underscores
102
+ dotnet_diagnostic.CA1707.severity = warning
103
+
104
+ # CA1708: Identifiers should differ by more than case
105
+ dotnet_diagnostic.CA1708.severity = warning
106
+
107
+ # CA1710: Identifiers should have correct suffix
108
+ dotnet_diagnostic.CA1710.severity = warning
109
+
110
+ # CA1711: Identifiers should not have incorrect suffix
111
+ dotnet_diagnostic.CA1711.severity = warning
112
+
113
+ # CA1712: Do not prefix enum values with type name
114
+ dotnet_diagnostic.CA1712.severity = warning
115
+
116
+ # CA1715: Identifiers should have correct prefix
117
+ dotnet_diagnostic.CA1715.severity = warning
118
+
119
+ # CA1716: Identifiers should not match keywords
120
+ dotnet_diagnostic.CA1716.severity = warning
121
+
122
+ # CA1720: Identifier contains type name
123
+ dotnet_diagnostic.CA1720.severity = warning
124
+
125
+ # CA1725: Parameter names should match base declaration
126
+ dotnet_diagnostic.CA1725.severity = warning
127
+
128
+ # CA1727: Use PascalCase for named placeholders
129
+ dotnet_diagnostic.CA1727.severity = warning
130
+
131
+ # CA1805: Do not initialize unnecessarily
132
+ dotnet_diagnostic.CA1805.severity = warning
133
+
134
+ # CA1806: Do not ignore method results
135
+ dotnet_diagnostic.CA1806.severity = warning
136
+
137
+ # CA1816: Dispose methods should call SuppressFinalize
138
+ dotnet_diagnostic.CA1816.severity = warning
139
+
140
+ # CA1821: Remove empty Finalizers
141
+ dotnet_diagnostic.CA1821.severity = warning
142
+
143
+ # CA1822: Mark members as static
144
+ dotnet_diagnostic.CA1822.severity = warning
145
+
146
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
147
+ dotnet_diagnostic.CA1824.severity = warning
148
+
149
+ # CA1825: Avoid zero-length array allocations
150
+ dotnet_diagnostic.CA1825.severity = warning
151
+
152
+ # CA1826: Do not use Enumerable methods on indexable collections
153
+ dotnet_diagnostic.CA1826.severity = warning
154
+
155
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
156
+ dotnet_diagnostic.CA1827.severity = warning
157
+
158
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
159
+ dotnet_diagnostic.CA1828.severity = warning
160
+
161
+ # CA1829: Use Length/Count property instead of Count() when available
162
+ dotnet_diagnostic.CA1829.severity = warning
163
+
164
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
165
+ dotnet_diagnostic.CA1830.severity = warning
166
+
167
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
168
+ dotnet_diagnostic.CA1832.severity = warning
169
+
170
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
171
+ dotnet_diagnostic.CA1833.severity = warning
172
+
173
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
174
+ dotnet_diagnostic.CA1834.severity = warning
175
+
176
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
177
+ dotnet_diagnostic.CA1835.severity = warning
178
+
179
+ # CA1836: Prefer IsEmpty over Count
180
+ dotnet_diagnostic.CA1836.severity = warning
181
+
182
+ # CA1837: Use 'Environment.ProcessId'
183
+ dotnet_diagnostic.CA1837.severity = warning
184
+
185
+ # CA1838: Avoid 'StringBuilder' parameters for P/Invokes
186
+ dotnet_diagnostic.CA1838.severity = warning
187
+
188
+ # CA1839: Use 'Environment.ProcessPath'
189
+ dotnet_diagnostic.CA1839.severity = warning
190
+
191
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
192
+ dotnet_diagnostic.CA1840.severity = warning
193
+
194
+ # CA1841: Prefer Dictionary.Contains methods
195
+ dotnet_diagnostic.CA1841.severity = warning
196
+
197
+ # CA1842: Do not use 'WhenAll' with a single task
198
+ dotnet_diagnostic.CA1842.severity = warning
199
+
200
+ # CA1843: Do not use 'WaitAll' with a single task
201
+ dotnet_diagnostic.CA1843.severity = warning
202
+
203
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
204
+ dotnet_diagnostic.CA1844.severity = warning
205
+
206
+ # CA1845: Use span-based 'string.Concat'
207
+ dotnet_diagnostic.CA1845.severity = warning
208
+
209
+ # CA1846: Prefer 'AsSpan' over 'Substring'
210
+ dotnet_diagnostic.CA1846.severity = warning
211
+
212
+ # CA1847: Use char literal for a single character lookup
213
+ dotnet_diagnostic.CA1847.severity = warning
214
+
215
+ # CA1848: Use the LoggerMessage delegates
216
+ dotnet_diagnostic.CA1848.severity = warning
217
+
218
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
219
+ dotnet_diagnostic.CA1850.severity = warning
220
+
221
+ # CA1852: Seal internal types
222
+ dotnet_diagnostic.CA1852.severity = warning
223
+
224
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
225
+ dotnet_diagnostic.CA1853.severity = warning
226
+
227
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
228
+ dotnet_diagnostic.CA1854.severity = warning
229
+
230
+ # CA1855: Prefer 'Clear' over 'Fill'
231
+ dotnet_diagnostic.CA1855.severity = warning
232
+
233
+ # CA1856: Incorrect usage of ConstantExpected attribute
234
+ dotnet_diagnostic.CA1856.severity = warning
235
+
236
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
237
+ dotnet_diagnostic.CA1858.severity = warning
238
+
239
+ # CA1859: Use concrete types when possible for improved performance
240
+ dotnet_diagnostic.CA1859.severity = warning
241
+
242
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
243
+ dotnet_diagnostic.CA1860.severity = warning
244
+
245
+ # CA1861: Avoid constant arrays as arguments
246
+ dotnet_diagnostic.CA1861.severity = warning
247
+
248
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
249
+ dotnet_diagnostic.CA1862.severity = warning
250
+
251
+ # CA1863: Use 'CompositeFormat'
252
+ dotnet_diagnostic.CA1863.severity = warning
253
+
254
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
255
+ dotnet_diagnostic.CA1864.severity = warning
256
+
257
+ # CA1865: Use char overload
258
+ dotnet_diagnostic.CA1865.severity = warning
259
+
260
+ # CA1866: Use char overload
261
+ dotnet_diagnostic.CA1866.severity = warning
262
+
263
+ # CA1868: Unnecessary call to 'Contains(item)'
264
+ dotnet_diagnostic.CA1868.severity = warning
265
+
266
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
267
+ dotnet_diagnostic.CA1869.severity = warning
268
+
269
+ # CA1870: Use a cached 'SearchValues' instance
270
+ dotnet_diagnostic.CA1870.severity = warning
271
+
272
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
273
+ dotnet_diagnostic.CA1871.severity = warning
274
+
275
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
276
+ dotnet_diagnostic.CA1872.severity = warning
277
+
278
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
279
+ dotnet_diagnostic.CA2009.severity = warning
280
+
281
+ # CA2011: Avoid infinite recursion
282
+ dotnet_diagnostic.CA2011.severity = warning
283
+
284
+ # CA2012: Use ValueTasks correctly
285
+ dotnet_diagnostic.CA2012.severity = warning
286
+
287
+ # CA2016: Forward the 'CancellationToken' parameter to methods
288
+ dotnet_diagnostic.CA2016.severity = warning
289
+
290
+ # CA2019: Improper 'ThreadStatic' field initialization
291
+ dotnet_diagnostic.CA2019.severity = warning
292
+
293
+ # CA2020: Prevent behavioral change
294
+ dotnet_diagnostic.CA2020.severity = warning
295
+
296
+ # CA2101: Specify marshaling for P/Invoke string arguments
297
+ dotnet_diagnostic.CA2101.severity = warning
298
+
299
+ # CA2201: Do not raise reserved exception types
300
+ dotnet_diagnostic.CA2201.severity = warning
301
+
302
+ # CA2208: Instantiate argument exceptions correctly
303
+ dotnet_diagnostic.CA2208.severity = warning
304
+
305
+ # CA2211: Non-constant fields should not be visible
306
+ dotnet_diagnostic.CA2211.severity = warning
307
+
308
+ # CA2215: Dispose methods should call base class dispose
309
+ dotnet_diagnostic.CA2215.severity = warning
310
+
311
+ # CA2218: Override GetHashCode on overriding Equals
312
+ dotnet_diagnostic.CA2218.severity = warning
313
+
314
+ # CA2219: Do not raise exceptions in finally clauses
315
+ dotnet_diagnostic.CA2219.severity = warning
316
+
317
+ # CA2224: Override Equals on overloading operator equals
318
+ dotnet_diagnostic.CA2224.severity = warning
319
+
320
+ # CA2231: Overload operator equals on overriding value type Equals
321
+ dotnet_diagnostic.CA2231.severity = warning
322
+
323
+ # CA2241: Provide correct arguments to formatting methods
324
+ dotnet_diagnostic.CA2241.severity = warning
325
+
326
+ # CA2242: Test for NaN correctly
327
+ dotnet_diagnostic.CA2242.severity = warning
328
+
329
+ # CA2244: Do not duplicate indexed element initializations
330
+ dotnet_diagnostic.CA2244.severity = warning
331
+
332
+ # CA2245: Do not assign a property to itself
333
+ dotnet_diagnostic.CA2245.severity = warning
334
+
335
+ # CA2246: Assigning symbol and its member in the same statement
336
+ dotnet_diagnostic.CA2246.severity = warning
337
+
338
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
339
+ dotnet_diagnostic.CA2248.severity = warning
340
+
341
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
342
+ dotnet_diagnostic.CA2249.severity = warning
343
+
344
+ # CA2250: Use 'ThrowIfCancellationRequested'
345
+ dotnet_diagnostic.CA2250.severity = warning
346
+
347
+ # CA2251: Use 'string.Equals'
348
+ dotnet_diagnostic.CA2251.severity = warning
349
+
350
+ # CA2252: This API requires opting into preview features
351
+ dotnet_diagnostic.CA2252.severity = warning
352
+
353
+ # CA2253: Named placeholders should not be numeric values
354
+ dotnet_diagnostic.CA2253.severity = warning
355
+
356
+ # CA2254: Template should be a static expression
357
+ dotnet_diagnostic.CA2254.severity = warning
358
+
359
+ # CA2262: Set 'MaxResponseHeadersLength' properly
360
+ dotnet_diagnostic.CA2262.severity = warning
361
+
362
+ # CA2263: Prefer generic overload when type is known
363
+ dotnet_diagnostic.CA2263.severity = warning
364
+
365
+ # CA3061: Do Not Add Schema By URL
366
+ dotnet_diagnostic.CA3061.severity = warning
367
+
368
+ # CA3075: Insecure DTD processing in XML
369
+ dotnet_diagnostic.CA3075.severity = warning
370
+
371
+ # CA3076: Insecure XSLT script processing
372
+ dotnet_diagnostic.CA3076.severity = warning
373
+
374
+ # CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader
375
+ dotnet_diagnostic.CA3077.severity = warning
376
+
377
+ # CA3147: Mark Verb Handlers With Validate Antiforgery Token
378
+ dotnet_diagnostic.CA3147.severity = warning
379
+
380
+ # CA5350: Do Not Use Weak Cryptographic Algorithms
381
+ dotnet_diagnostic.CA5350.severity = warning
382
+
383
+ # CA5351: Do Not Use Broken Cryptographic Algorithms
384
+ dotnet_diagnostic.CA5351.severity = warning
385
+
386
+ # CA5359: Do Not Disable Certificate Validation
387
+ dotnet_diagnostic.CA5359.severity = warning
388
+
389
+ # CA5360: Do Not Call Dangerous Methods In Deserialization
390
+ dotnet_diagnostic.CA5360.severity = warning
391
+
392
+ # CA5363: Do Not Disable Request Validation
393
+ dotnet_diagnostic.CA5363.severity = warning
394
+
395
+ # CA5364: Do Not Use Deprecated Security Protocols
396
+ dotnet_diagnostic.CA5364.severity = warning
397
+
398
+ # CA5365: Do Not Disable HTTP Header Checking
399
+ dotnet_diagnostic.CA5365.severity = warning
400
+
401
+ # CA5366: Use XmlReader for 'DataSet.ReadXml()'
402
+ dotnet_diagnostic.CA5366.severity = warning
403
+
404
+ # CA5368: Set ViewStateUserKey For Classes Derived From Page
405
+ dotnet_diagnostic.CA5368.severity = warning
406
+
407
+ # CA5369: Use XmlReader for 'XmlSerializer.Deserialize()'
408
+ dotnet_diagnostic.CA5369.severity = warning
409
+
410
+ # CA5370: Use XmlReader for XmlValidatingReader constructor
411
+ dotnet_diagnostic.CA5370.severity = warning
412
+
413
+ # CA5371: Use XmlReader for 'XmlSchema.Read()'
414
+ dotnet_diagnostic.CA5371.severity = warning
415
+
416
+ # CA5372: Use XmlReader for XPathDocument constructor
417
+ dotnet_diagnostic.CA5372.severity = warning
418
+
419
+ # CA5373: Do not use obsolete key derivation function
420
+ dotnet_diagnostic.CA5373.severity = warning
421
+
422
+ # CA5374: Do Not Use XslTransform
423
+ dotnet_diagnostic.CA5374.severity = warning
424
+
425
+ # CA5379: Ensure Key Derivation Function algorithm is sufficiently strong
426
+ dotnet_diagnostic.CA5379.severity = warning
427
+
428
+ # CA5384: Do Not Use Digital Signature Algorithm (DSA)
429
+ dotnet_diagnostic.CA5384.severity = warning
430
+
431
+ # CA5385: Use Rivest-Shamir-Adleman (RSA) Algorithm With Sufficient Key Size
432
+ dotnet_diagnostic.CA5385.severity = warning
433
+
434
+ # CA5397: Do not use deprecated SslProtocols values
435
+ dotnet_diagnostic.CA5397.severity = warning
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_recommended_warnaserror.globalconfig ADDED
@@ -0,0 +1,504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '10.0' release with 'Recommended' analysis mode escalated to 'error' severity
4
+ # Description: Rules with enabled-by-default state from '10.0' release with 'Recommended' analysis mode. Rules that are first released in a version later than '10.0' are disabled. Enabled rules with 'warning' severity are escalated to 'error' severity to respect 'CodeAnalysisTreatWarningsAsErrors' MSBuild property.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1000: Do not declare static members on generic types
12
+ dotnet_diagnostic.CA1000.severity = error
13
+
14
+ # CA1001: Types that own disposable fields should be disposable
15
+ dotnet_diagnostic.CA1001.severity = error
16
+
17
+ # CA1010: Generic interface should also be implemented
18
+ dotnet_diagnostic.CA1010.severity = error
19
+
20
+ # CA1016: Mark assemblies with assembly version
21
+ dotnet_diagnostic.CA1016.severity = error
22
+
23
+ # CA1018: Mark attributes with AttributeUsageAttribute
24
+ dotnet_diagnostic.CA1018.severity = error
25
+
26
+ # CA1036: Override methods on comparable types
27
+ dotnet_diagnostic.CA1036.severity = error
28
+
29
+ # CA1041: Provide ObsoleteAttribute message
30
+ dotnet_diagnostic.CA1041.severity = error
31
+
32
+ # CA1047: Do not declare protected member in sealed type
33
+ dotnet_diagnostic.CA1047.severity = error
34
+
35
+ # CA1050: Declare types in namespaces
36
+ dotnet_diagnostic.CA1050.severity = error
37
+
38
+ # CA1051: Do not declare visible instance fields
39
+ dotnet_diagnostic.CA1051.severity = error
40
+
41
+ # CA1061: Do not hide base class methods
42
+ dotnet_diagnostic.CA1061.severity = error
43
+
44
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
45
+ dotnet_diagnostic.CA1067.severity = error
46
+
47
+ # CA1068: CancellationToken parameters must come last
48
+ dotnet_diagnostic.CA1068.severity = error
49
+
50
+ # CA1069: Enums values should not be duplicated
51
+ dotnet_diagnostic.CA1069.severity = error
52
+
53
+ # CA1070: Do not declare event fields as virtual
54
+ dotnet_diagnostic.CA1070.severity = error
55
+
56
+ # CA1200: Avoid using cref tags with a prefix
57
+ dotnet_diagnostic.CA1200.severity = error
58
+
59
+ # CA1304: Specify CultureInfo
60
+ dotnet_diagnostic.CA1304.severity = error
61
+
62
+ # CA1305: Specify IFormatProvider
63
+ dotnet_diagnostic.CA1305.severity = error
64
+
65
+ # CA1309: Use ordinal string comparison
66
+ dotnet_diagnostic.CA1309.severity = error
67
+
68
+ # CA1310: Specify StringComparison for correctness
69
+ dotnet_diagnostic.CA1310.severity = error
70
+
71
+ # CA1311: Specify a culture or use an invariant version
72
+ dotnet_diagnostic.CA1311.severity = error
73
+
74
+ # CA1401: P/Invokes should not be visible
75
+ dotnet_diagnostic.CA1401.severity = error
76
+
77
+ # CA1416: Validate platform compatibility
78
+ dotnet_diagnostic.CA1416.severity = error
79
+
80
+ # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes
81
+ dotnet_diagnostic.CA1417.severity = error
82
+
83
+ # CA1418: Use valid platform string
84
+ dotnet_diagnostic.CA1418.severity = error
85
+
86
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
87
+ dotnet_diagnostic.CA1419.severity = error
88
+
89
+ # CA1420: Property, type, or attribute requires runtime marshalling
90
+ dotnet_diagnostic.CA1420.severity = error
91
+
92
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
93
+ dotnet_diagnostic.CA1421.severity = error
94
+
95
+ # CA1422: Validate platform compatibility
96
+ dotnet_diagnostic.CA1422.severity = error
97
+
98
+ # CA1507: Use nameof to express symbol names
99
+ dotnet_diagnostic.CA1507.severity = error
100
+
101
+ # CA1510: Use ArgumentNullException throw helper
102
+ dotnet_diagnostic.CA1510.severity = error
103
+
104
+ # CA1511: Use ArgumentException throw helper
105
+ dotnet_diagnostic.CA1511.severity = error
106
+
107
+ # CA1512: Use ArgumentOutOfRangeException throw helper
108
+ dotnet_diagnostic.CA1512.severity = error
109
+
110
+ # CA1513: Use ObjectDisposedException throw helper
111
+ dotnet_diagnostic.CA1513.severity = error
112
+
113
+ # CA1514: Avoid redundant length argument
114
+ dotnet_diagnostic.CA1514.severity = error
115
+
116
+ # CA1707: Identifiers should not contain underscores
117
+ dotnet_diagnostic.CA1707.severity = error
118
+
119
+ # CA1708: Identifiers should differ by more than case
120
+ dotnet_diagnostic.CA1708.severity = error
121
+
122
+ # CA1710: Identifiers should have correct suffix
123
+ dotnet_diagnostic.CA1710.severity = error
124
+
125
+ # CA1711: Identifiers should not have incorrect suffix
126
+ dotnet_diagnostic.CA1711.severity = error
127
+
128
+ # CA1712: Do not prefix enum values with type name
129
+ dotnet_diagnostic.CA1712.severity = error
130
+
131
+ # CA1715: Identifiers should have correct prefix
132
+ dotnet_diagnostic.CA1715.severity = error
133
+
134
+ # CA1716: Identifiers should not match keywords
135
+ dotnet_diagnostic.CA1716.severity = error
136
+
137
+ # CA1720: Identifier contains type name
138
+ dotnet_diagnostic.CA1720.severity = error
139
+
140
+ # CA1725: Parameter names should match base declaration
141
+ dotnet_diagnostic.CA1725.severity = error
142
+
143
+ # CA1727: Use PascalCase for named placeholders
144
+ dotnet_diagnostic.CA1727.severity = error
145
+
146
+ # CA1805: Do not initialize unnecessarily
147
+ dotnet_diagnostic.CA1805.severity = error
148
+
149
+ # CA1806: Do not ignore method results
150
+ dotnet_diagnostic.CA1806.severity = error
151
+
152
+ # CA1816: Dispose methods should call SuppressFinalize
153
+ dotnet_diagnostic.CA1816.severity = error
154
+
155
+ # CA1821: Remove empty Finalizers
156
+ dotnet_diagnostic.CA1821.severity = error
157
+
158
+ # CA1822: Mark members as static
159
+ dotnet_diagnostic.CA1822.severity = error
160
+
161
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
162
+ dotnet_diagnostic.CA1824.severity = error
163
+
164
+ # CA1825: Avoid zero-length array allocations
165
+ dotnet_diagnostic.CA1825.severity = error
166
+
167
+ # CA1826: Do not use Enumerable methods on indexable collections
168
+ dotnet_diagnostic.CA1826.severity = error
169
+
170
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
171
+ dotnet_diagnostic.CA1827.severity = error
172
+
173
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
174
+ dotnet_diagnostic.CA1828.severity = error
175
+
176
+ # CA1829: Use Length/Count property instead of Count() when available
177
+ dotnet_diagnostic.CA1829.severity = error
178
+
179
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
180
+ dotnet_diagnostic.CA1830.severity = error
181
+
182
+ # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
183
+ dotnet_diagnostic.CA1831.severity = error
184
+
185
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
186
+ dotnet_diagnostic.CA1832.severity = error
187
+
188
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
189
+ dotnet_diagnostic.CA1833.severity = error
190
+
191
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
192
+ dotnet_diagnostic.CA1834.severity = error
193
+
194
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
195
+ dotnet_diagnostic.CA1835.severity = error
196
+
197
+ # CA1836: Prefer IsEmpty over Count
198
+ dotnet_diagnostic.CA1836.severity = error
199
+
200
+ # CA1837: Use 'Environment.ProcessId'
201
+ dotnet_diagnostic.CA1837.severity = error
202
+
203
+ # CA1838: Avoid 'StringBuilder' parameters for P/Invokes
204
+ dotnet_diagnostic.CA1838.severity = error
205
+
206
+ # CA1839: Use 'Environment.ProcessPath'
207
+ dotnet_diagnostic.CA1839.severity = error
208
+
209
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
210
+ dotnet_diagnostic.CA1840.severity = error
211
+
212
+ # CA1841: Prefer Dictionary.Contains methods
213
+ dotnet_diagnostic.CA1841.severity = error
214
+
215
+ # CA1842: Do not use 'WhenAll' with a single task
216
+ dotnet_diagnostic.CA1842.severity = error
217
+
218
+ # CA1843: Do not use 'WaitAll' with a single task
219
+ dotnet_diagnostic.CA1843.severity = error
220
+
221
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
222
+ dotnet_diagnostic.CA1844.severity = error
223
+
224
+ # CA1845: Use span-based 'string.Concat'
225
+ dotnet_diagnostic.CA1845.severity = error
226
+
227
+ # CA1846: Prefer 'AsSpan' over 'Substring'
228
+ dotnet_diagnostic.CA1846.severity = error
229
+
230
+ # CA1847: Use char literal for a single character lookup
231
+ dotnet_diagnostic.CA1847.severity = error
232
+
233
+ # CA1848: Use the LoggerMessage delegates
234
+ dotnet_diagnostic.CA1848.severity = error
235
+
236
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
237
+ dotnet_diagnostic.CA1850.severity = error
238
+
239
+ # CA1852: Seal internal types
240
+ dotnet_diagnostic.CA1852.severity = error
241
+
242
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
243
+ dotnet_diagnostic.CA1853.severity = error
244
+
245
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
246
+ dotnet_diagnostic.CA1854.severity = error
247
+
248
+ # CA1855: Prefer 'Clear' over 'Fill'
249
+ dotnet_diagnostic.CA1855.severity = error
250
+
251
+ # CA1857: A constant is expected for the parameter
252
+ dotnet_diagnostic.CA1857.severity = error
253
+
254
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
255
+ dotnet_diagnostic.CA1858.severity = error
256
+
257
+ # CA1859: Use concrete types when possible for improved performance
258
+ dotnet_diagnostic.CA1859.severity = error
259
+
260
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
261
+ dotnet_diagnostic.CA1860.severity = error
262
+
263
+ # CA1861: Avoid constant arrays as arguments
264
+ dotnet_diagnostic.CA1861.severity = error
265
+
266
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
267
+ dotnet_diagnostic.CA1862.severity = error
268
+
269
+ # CA1863: Use 'CompositeFormat'
270
+ dotnet_diagnostic.CA1863.severity = error
271
+
272
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
273
+ dotnet_diagnostic.CA1864.severity = error
274
+
275
+ # CA1865: Use char overload
276
+ dotnet_diagnostic.CA1865.severity = error
277
+
278
+ # CA1866: Use char overload
279
+ dotnet_diagnostic.CA1866.severity = error
280
+
281
+ # CA1868: Unnecessary call to 'Contains(item)'
282
+ dotnet_diagnostic.CA1868.severity = error
283
+
284
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
285
+ dotnet_diagnostic.CA1869.severity = error
286
+
287
+ # CA1870: Use a cached 'SearchValues' instance
288
+ dotnet_diagnostic.CA1870.severity = error
289
+
290
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
291
+ dotnet_diagnostic.CA1871.severity = error
292
+
293
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
294
+ dotnet_diagnostic.CA1872.severity = error
295
+
296
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
297
+ dotnet_diagnostic.CA2009.severity = error
298
+
299
+ # CA2011: Avoid infinite recursion
300
+ dotnet_diagnostic.CA2011.severity = error
301
+
302
+ # CA2012: Use ValueTasks correctly
303
+ dotnet_diagnostic.CA2012.severity = error
304
+
305
+ # CA2013: Do not use ReferenceEquals with value types
306
+ dotnet_diagnostic.CA2013.severity = error
307
+
308
+ # CA2014: Do not use stackalloc in loops
309
+ dotnet_diagnostic.CA2014.severity = error
310
+
311
+ # CA2015: Do not define finalizers for types derived from MemoryManager<T>
312
+ dotnet_diagnostic.CA2015.severity = error
313
+
314
+ # CA2016: Forward the 'CancellationToken' parameter to methods
315
+ dotnet_diagnostic.CA2016.severity = error
316
+
317
+ # CA2017: Parameter count mismatch
318
+ dotnet_diagnostic.CA2017.severity = error
319
+
320
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
321
+ dotnet_diagnostic.CA2018.severity = error
322
+
323
+ # CA2019: Improper 'ThreadStatic' field initialization
324
+ dotnet_diagnostic.CA2019.severity = error
325
+
326
+ # CA2020: Prevent behavioral change
327
+ dotnet_diagnostic.CA2020.severity = error
328
+
329
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
330
+ dotnet_diagnostic.CA2021.severity = error
331
+
332
+ # CA2022: Avoid inexact read with 'Stream.Read'
333
+ dotnet_diagnostic.CA2022.severity = error
334
+
335
+ # CA2101: Specify marshaling for P/Invoke string arguments
336
+ dotnet_diagnostic.CA2101.severity = error
337
+
338
+ # CA2200: Rethrow to preserve stack details
339
+ dotnet_diagnostic.CA2200.severity = error
340
+
341
+ # CA2201: Do not raise reserved exception types
342
+ dotnet_diagnostic.CA2201.severity = error
343
+
344
+ # CA2208: Instantiate argument exceptions correctly
345
+ dotnet_diagnostic.CA2208.severity = error
346
+
347
+ # CA2211: Non-constant fields should not be visible
348
+ dotnet_diagnostic.CA2211.severity = error
349
+
350
+ # CA2215: Dispose methods should call base class dispose
351
+ dotnet_diagnostic.CA2215.severity = error
352
+
353
+ # CA2218: Override GetHashCode on overriding Equals
354
+ dotnet_diagnostic.CA2218.severity = error
355
+
356
+ # CA2219: Do not raise exceptions in finally clauses
357
+ dotnet_diagnostic.CA2219.severity = error
358
+
359
+ # CA2224: Override Equals on overloading operator equals
360
+ dotnet_diagnostic.CA2224.severity = error
361
+
362
+ # CA2231: Overload operator equals on overriding value type Equals
363
+ dotnet_diagnostic.CA2231.severity = error
364
+
365
+ # CA2241: Provide correct arguments to formatting methods
366
+ dotnet_diagnostic.CA2241.severity = error
367
+
368
+ # CA2242: Test for NaN correctly
369
+ dotnet_diagnostic.CA2242.severity = error
370
+
371
+ # CA2244: Do not duplicate indexed element initializations
372
+ dotnet_diagnostic.CA2244.severity = error
373
+
374
+ # CA2245: Do not assign a property to itself
375
+ dotnet_diagnostic.CA2245.severity = error
376
+
377
+ # CA2246: Assigning symbol and its member in the same statement
378
+ dotnet_diagnostic.CA2246.severity = error
379
+
380
+ # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
381
+ dotnet_diagnostic.CA2247.severity = error
382
+
383
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
384
+ dotnet_diagnostic.CA2248.severity = error
385
+
386
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
387
+ dotnet_diagnostic.CA2249.severity = error
388
+
389
+ # CA2250: Use 'ThrowIfCancellationRequested'
390
+ dotnet_diagnostic.CA2250.severity = error
391
+
392
+ # CA2251: Use 'string.Equals'
393
+ dotnet_diagnostic.CA2251.severity = error
394
+
395
+ # CA2253: Named placeholders should not be numeric values
396
+ dotnet_diagnostic.CA2253.severity = error
397
+
398
+ # CA2254: Template should be a static expression
399
+ dotnet_diagnostic.CA2254.severity = error
400
+
401
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
402
+ dotnet_diagnostic.CA2255.severity = error
403
+
404
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
405
+ dotnet_diagnostic.CA2256.severity = error
406
+
407
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
408
+ dotnet_diagnostic.CA2257.severity = error
409
+
410
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
411
+ dotnet_diagnostic.CA2258.severity = error
412
+
413
+ # CA2259: 'ThreadStatic' only affects static fields
414
+ dotnet_diagnostic.CA2259.severity = error
415
+
416
+ # CA2260: Use correct type parameter
417
+ dotnet_diagnostic.CA2260.severity = error
418
+
419
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
420
+ dotnet_diagnostic.CA2261.severity = error
421
+
422
+ # CA2262: Set 'MaxResponseHeadersLength' properly
423
+ dotnet_diagnostic.CA2262.severity = error
424
+
425
+ # CA2263: Prefer generic overload when type is known
426
+ dotnet_diagnostic.CA2263.severity = error
427
+
428
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
429
+ dotnet_diagnostic.CA2264.severity = error
430
+
431
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
432
+ dotnet_diagnostic.CA2265.severity = error
433
+
434
+ # CA3061: Do Not Add Schema By URL
435
+ dotnet_diagnostic.CA3061.severity = error
436
+
437
+ # CA3075: Insecure DTD processing in XML
438
+ dotnet_diagnostic.CA3075.severity = error
439
+
440
+ # CA3076: Insecure XSLT script processing
441
+ dotnet_diagnostic.CA3076.severity = error
442
+
443
+ # CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader
444
+ dotnet_diagnostic.CA3077.severity = error
445
+
446
+ # CA3147: Mark Verb Handlers With Validate Antiforgery Token
447
+ dotnet_diagnostic.CA3147.severity = error
448
+
449
+ # CA5350: Do Not Use Weak Cryptographic Algorithms
450
+ dotnet_diagnostic.CA5350.severity = error
451
+
452
+ # CA5351: Do Not Use Broken Cryptographic Algorithms
453
+ dotnet_diagnostic.CA5351.severity = error
454
+
455
+ # CA5359: Do Not Disable Certificate Validation
456
+ dotnet_diagnostic.CA5359.severity = error
457
+
458
+ # CA5360: Do Not Call Dangerous Methods In Deserialization
459
+ dotnet_diagnostic.CA5360.severity = error
460
+
461
+ # CA5363: Do Not Disable Request Validation
462
+ dotnet_diagnostic.CA5363.severity = error
463
+
464
+ # CA5364: Do Not Use Deprecated Security Protocols
465
+ dotnet_diagnostic.CA5364.severity = error
466
+
467
+ # CA5365: Do Not Disable HTTP Header Checking
468
+ dotnet_diagnostic.CA5365.severity = error
469
+
470
+ # CA5366: Use XmlReader for 'DataSet.ReadXml()'
471
+ dotnet_diagnostic.CA5366.severity = error
472
+
473
+ # CA5368: Set ViewStateUserKey For Classes Derived From Page
474
+ dotnet_diagnostic.CA5368.severity = error
475
+
476
+ # CA5369: Use XmlReader for 'XmlSerializer.Deserialize()'
477
+ dotnet_diagnostic.CA5369.severity = error
478
+
479
+ # CA5370: Use XmlReader for XmlValidatingReader constructor
480
+ dotnet_diagnostic.CA5370.severity = error
481
+
482
+ # CA5371: Use XmlReader for 'XmlSchema.Read()'
483
+ dotnet_diagnostic.CA5371.severity = error
484
+
485
+ # CA5372: Use XmlReader for XPathDocument constructor
486
+ dotnet_diagnostic.CA5372.severity = error
487
+
488
+ # CA5373: Do not use obsolete key derivation function
489
+ dotnet_diagnostic.CA5373.severity = error
490
+
491
+ # CA5374: Do Not Use XslTransform
492
+ dotnet_diagnostic.CA5374.severity = error
493
+
494
+ # CA5379: Ensure Key Derivation Function algorithm is sufficiently strong
495
+ dotnet_diagnostic.CA5379.severity = error
496
+
497
+ # CA5384: Do Not Use Digital Signature Algorithm (DSA)
498
+ dotnet_diagnostic.CA5384.severity = error
499
+
500
+ # CA5385: Use Rivest-Shamir-Adleman (RSA) Algorithm With Sufficient Key Size
501
+ dotnet_diagnostic.CA5385.severity = error
502
+
503
+ # CA5397: Do not use deprecated SslProtocols values
504
+ dotnet_diagnostic.CA5397.severity = error
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_all.globalconfig ADDED
@@ -0,0 +1,870 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '5.0' release with 'All' analysis mode
4
+ # Description: Rules with enabled-by-default state from '5.0' release with 'All' analysis mode. Rules that are first released in a version later than '5.0' are disabled.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1000: Do not declare static members on generic types
12
+ dotnet_diagnostic.CA1000.severity = warning
13
+
14
+ # CA1001: Types that own disposable fields should be disposable
15
+ dotnet_diagnostic.CA1001.severity = warning
16
+
17
+ # CA1002: Do not expose generic lists
18
+ dotnet_diagnostic.CA1002.severity = warning
19
+
20
+ # CA1003: Use generic event handler instances
21
+ dotnet_diagnostic.CA1003.severity = warning
22
+
23
+ # CA1008: Enums should have zero value
24
+ dotnet_diagnostic.CA1008.severity = warning
25
+
26
+ # CA1010: Generic interface should also be implemented
27
+ dotnet_diagnostic.CA1010.severity = warning
28
+
29
+ # CA1012: Abstract types should not have public constructors
30
+ dotnet_diagnostic.CA1012.severity = warning
31
+
32
+ # CA1016: Mark assemblies with assembly version
33
+ dotnet_diagnostic.CA1016.severity = warning
34
+
35
+ # CA1018: Mark attributes with AttributeUsageAttribute
36
+ dotnet_diagnostic.CA1018.severity = warning
37
+
38
+ # CA1019: Define accessors for attribute arguments
39
+ dotnet_diagnostic.CA1019.severity = warning
40
+
41
+ # CA1024: Use properties where appropriate
42
+ dotnet_diagnostic.CA1024.severity = warning
43
+
44
+ # CA1027: Mark enums with FlagsAttribute
45
+ dotnet_diagnostic.CA1027.severity = warning
46
+
47
+ # CA1028: Enum Storage should be Int32
48
+ dotnet_diagnostic.CA1028.severity = warning
49
+
50
+ # CA1030: Use events where appropriate
51
+ dotnet_diagnostic.CA1030.severity = warning
52
+
53
+ # CA1031: Do not catch general exception types
54
+ dotnet_diagnostic.CA1031.severity = warning
55
+
56
+ # CA1032: Implement standard exception constructors
57
+ dotnet_diagnostic.CA1032.severity = warning
58
+
59
+ # CA1033: Interface methods should be callable by child types
60
+ dotnet_diagnostic.CA1033.severity = warning
61
+
62
+ # CA1034: Nested types should not be visible
63
+ dotnet_diagnostic.CA1034.severity = warning
64
+
65
+ # CA1036: Override methods on comparable types
66
+ dotnet_diagnostic.CA1036.severity = warning
67
+
68
+ # CA1040: Avoid empty interfaces
69
+ dotnet_diagnostic.CA1040.severity = warning
70
+
71
+ # CA1041: Provide ObsoleteAttribute message
72
+ dotnet_diagnostic.CA1041.severity = warning
73
+
74
+ # CA1043: Use Integral Or String Argument For Indexers
75
+ dotnet_diagnostic.CA1043.severity = warning
76
+
77
+ # CA1044: Properties should not be write only
78
+ dotnet_diagnostic.CA1044.severity = warning
79
+
80
+ # CA1046: Do not overload equality operator on reference types
81
+ dotnet_diagnostic.CA1046.severity = warning
82
+
83
+ # CA1047: Do not declare protected member in sealed type
84
+ dotnet_diagnostic.CA1047.severity = warning
85
+
86
+ # CA1050: Declare types in namespaces
87
+ dotnet_diagnostic.CA1050.severity = warning
88
+
89
+ # CA1051: Do not declare visible instance fields
90
+ dotnet_diagnostic.CA1051.severity = warning
91
+
92
+ # CA1052: Static holder types should be Static or NotInheritable
93
+ dotnet_diagnostic.CA1052.severity = warning
94
+
95
+ # CA1054: URI-like parameters should not be strings
96
+ dotnet_diagnostic.CA1054.severity = warning
97
+
98
+ # CA1055: URI-like return values should not be strings
99
+ dotnet_diagnostic.CA1055.severity = warning
100
+
101
+ # CA1056: URI-like properties should not be strings
102
+ dotnet_diagnostic.CA1056.severity = warning
103
+
104
+ # CA1058: Types should not extend certain base types
105
+ dotnet_diagnostic.CA1058.severity = warning
106
+
107
+ # CA1061: Do not hide base class methods
108
+ dotnet_diagnostic.CA1061.severity = warning
109
+
110
+ # CA1062: Validate arguments of public methods
111
+ dotnet_diagnostic.CA1062.severity = warning
112
+
113
+ # CA1063: Implement IDisposable Correctly
114
+ dotnet_diagnostic.CA1063.severity = warning
115
+
116
+ # CA1064: Exceptions should be public
117
+ dotnet_diagnostic.CA1064.severity = warning
118
+
119
+ # CA1065: Do not raise exceptions in unexpected locations
120
+ dotnet_diagnostic.CA1065.severity = warning
121
+
122
+ # CA1066: Implement IEquatable when overriding Object.Equals
123
+ dotnet_diagnostic.CA1066.severity = warning
124
+
125
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
126
+ dotnet_diagnostic.CA1067.severity = warning
127
+
128
+ # CA1068: CancellationToken parameters must come last
129
+ dotnet_diagnostic.CA1068.severity = warning
130
+
131
+ # CA1069: Enums values should not be duplicated
132
+ dotnet_diagnostic.CA1069.severity = warning
133
+
134
+ # CA1070: Do not declare event fields as virtual
135
+ dotnet_diagnostic.CA1070.severity = warning
136
+
137
+ # CA1200: Avoid using cref tags with a prefix
138
+ dotnet_diagnostic.CA1200.severity = warning
139
+
140
+ # CA1303: Do not pass literals as localized parameters
141
+ dotnet_diagnostic.CA1303.severity = warning
142
+
143
+ # CA1304: Specify CultureInfo
144
+ dotnet_diagnostic.CA1304.severity = warning
145
+
146
+ # CA1305: Specify IFormatProvider
147
+ dotnet_diagnostic.CA1305.severity = warning
148
+
149
+ # CA1307: Specify StringComparison for clarity
150
+ dotnet_diagnostic.CA1307.severity = warning
151
+
152
+ # CA1308: Normalize strings to uppercase
153
+ dotnet_diagnostic.CA1308.severity = warning
154
+
155
+ # CA1309: Use ordinal string comparison
156
+ dotnet_diagnostic.CA1309.severity = warning
157
+
158
+ # CA1310: Specify StringComparison for correctness
159
+ dotnet_diagnostic.CA1310.severity = warning
160
+
161
+ # CA1311: Specify a culture or use an invariant version
162
+ dotnet_diagnostic.CA1311.severity = none
163
+
164
+ # CA1401: P/Invokes should not be visible
165
+ dotnet_diagnostic.CA1401.severity = warning
166
+
167
+ # CA1418: Use valid platform string
168
+ dotnet_diagnostic.CA1418.severity = none
169
+
170
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
171
+ dotnet_diagnostic.CA1419.severity = none
172
+
173
+ # CA1420: Property, type, or attribute requires runtime marshalling
174
+ dotnet_diagnostic.CA1420.severity = none
175
+
176
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
177
+ dotnet_diagnostic.CA1421.severity = none
178
+
179
+ # CA1422: Validate platform compatibility
180
+ dotnet_diagnostic.CA1422.severity = none
181
+
182
+ # CA1507: Use nameof to express symbol names
183
+ dotnet_diagnostic.CA1507.severity = warning
184
+
185
+ # CA1508: Avoid dead conditional code
186
+ dotnet_diagnostic.CA1508.severity = warning
187
+
188
+ # CA1510: Use ArgumentNullException throw helper
189
+ dotnet_diagnostic.CA1510.severity = none
190
+
191
+ # CA1511: Use ArgumentException throw helper
192
+ dotnet_diagnostic.CA1511.severity = none
193
+
194
+ # CA1512: Use ArgumentOutOfRangeException throw helper
195
+ dotnet_diagnostic.CA1512.severity = none
196
+
197
+ # CA1513: Use ObjectDisposedException throw helper
198
+ dotnet_diagnostic.CA1513.severity = none
199
+
200
+ # CA1514: Avoid redundant length argument
201
+ dotnet_diagnostic.CA1514.severity = none
202
+
203
+ # CA1700: Do not name enum values 'Reserved'
204
+ dotnet_diagnostic.CA1700.severity = warning
205
+
206
+ # CA1707: Identifiers should not contain underscores
207
+ dotnet_diagnostic.CA1707.severity = warning
208
+
209
+ # CA1708: Identifiers should differ by more than case
210
+ dotnet_diagnostic.CA1708.severity = warning
211
+
212
+ # CA1710: Identifiers should have correct suffix
213
+ dotnet_diagnostic.CA1710.severity = warning
214
+
215
+ # CA1711: Identifiers should not have incorrect suffix
216
+ dotnet_diagnostic.CA1711.severity = warning
217
+
218
+ # CA1712: Do not prefix enum values with type name
219
+ dotnet_diagnostic.CA1712.severity = warning
220
+
221
+ # CA1713: Events should not have 'Before' or 'After' prefix
222
+ dotnet_diagnostic.CA1713.severity = warning
223
+
224
+ # CA1715: Identifiers should have correct prefix
225
+ dotnet_diagnostic.CA1715.severity = warning
226
+
227
+ # CA1716: Identifiers should not match keywords
228
+ dotnet_diagnostic.CA1716.severity = warning
229
+
230
+ # CA1720: Identifier contains type name
231
+ dotnet_diagnostic.CA1720.severity = warning
232
+
233
+ # CA1721: Property names should not match get methods
234
+ dotnet_diagnostic.CA1721.severity = warning
235
+
236
+ # CA1724: Type names should not match namespaces
237
+ dotnet_diagnostic.CA1724.severity = warning
238
+
239
+ # CA1725: Parameter names should match base declaration
240
+ dotnet_diagnostic.CA1725.severity = warning
241
+
242
+ # CA1727: Use PascalCase for named placeholders
243
+ dotnet_diagnostic.CA1727.severity = none
244
+
245
+ # CA1802: Use literals where appropriate
246
+ dotnet_diagnostic.CA1802.severity = warning
247
+
248
+ # CA1805: Do not initialize unnecessarily
249
+ dotnet_diagnostic.CA1805.severity = warning
250
+
251
+ # CA1806: Do not ignore method results
252
+ dotnet_diagnostic.CA1806.severity = warning
253
+
254
+ # CA1810: Initialize reference type static fields inline
255
+ dotnet_diagnostic.CA1810.severity = warning
256
+
257
+ # CA1812: Avoid uninstantiated internal classes
258
+ dotnet_diagnostic.CA1812.severity = warning
259
+
260
+ # CA1813: Avoid unsealed attributes
261
+ dotnet_diagnostic.CA1813.severity = warning
262
+
263
+ # CA1814: Prefer jagged arrays over multidimensional
264
+ dotnet_diagnostic.CA1814.severity = warning
265
+
266
+ # CA1815: Override equals and operator equals on value types
267
+ dotnet_diagnostic.CA1815.severity = warning
268
+
269
+ # CA1816: Dispose methods should call SuppressFinalize
270
+ dotnet_diagnostic.CA1816.severity = warning
271
+
272
+ # CA1819: Properties should not return arrays
273
+ dotnet_diagnostic.CA1819.severity = warning
274
+
275
+ # CA1820: Test for empty strings using string length
276
+ dotnet_diagnostic.CA1820.severity = warning
277
+
278
+ # CA1821: Remove empty Finalizers
279
+ dotnet_diagnostic.CA1821.severity = warning
280
+
281
+ # CA1822: Mark members as static
282
+ dotnet_diagnostic.CA1822.severity = warning
283
+
284
+ # CA1823: Avoid unused private fields
285
+ dotnet_diagnostic.CA1823.severity = warning
286
+
287
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
288
+ dotnet_diagnostic.CA1824.severity = warning
289
+
290
+ # CA1825: Avoid zero-length array allocations
291
+ dotnet_diagnostic.CA1825.severity = warning
292
+
293
+ # CA1826: Do not use Enumerable methods on indexable collections
294
+ dotnet_diagnostic.CA1826.severity = warning
295
+
296
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
297
+ dotnet_diagnostic.CA1827.severity = warning
298
+
299
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
300
+ dotnet_diagnostic.CA1828.severity = warning
301
+
302
+ # CA1829: Use Length/Count property instead of Count() when available
303
+ dotnet_diagnostic.CA1829.severity = warning
304
+
305
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
306
+ dotnet_diagnostic.CA1830.severity = warning
307
+
308
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
309
+ dotnet_diagnostic.CA1832.severity = warning
310
+
311
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
312
+ dotnet_diagnostic.CA1833.severity = warning
313
+
314
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
315
+ dotnet_diagnostic.CA1834.severity = warning
316
+
317
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
318
+ dotnet_diagnostic.CA1835.severity = warning
319
+
320
+ # CA1836: Prefer IsEmpty over Count
321
+ dotnet_diagnostic.CA1836.severity = warning
322
+
323
+ # CA1837: Use 'Environment.ProcessId'
324
+ dotnet_diagnostic.CA1837.severity = warning
325
+
326
+ # CA1838: Avoid 'StringBuilder' parameters for P/Invokes
327
+ dotnet_diagnostic.CA1838.severity = warning
328
+
329
+ # CA1839: Use 'Environment.ProcessPath'
330
+ dotnet_diagnostic.CA1839.severity = none
331
+
332
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
333
+ dotnet_diagnostic.CA1840.severity = none
334
+
335
+ # CA1841: Prefer Dictionary.Contains methods
336
+ dotnet_diagnostic.CA1841.severity = none
337
+
338
+ # CA1842: Do not use 'WhenAll' with a single task
339
+ dotnet_diagnostic.CA1842.severity = none
340
+
341
+ # CA1843: Do not use 'WaitAll' with a single task
342
+ dotnet_diagnostic.CA1843.severity = none
343
+
344
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
345
+ dotnet_diagnostic.CA1844.severity = none
346
+
347
+ # CA1845: Use span-based 'string.Concat'
348
+ dotnet_diagnostic.CA1845.severity = none
349
+
350
+ # CA1846: Prefer 'AsSpan' over 'Substring'
351
+ dotnet_diagnostic.CA1846.severity = none
352
+
353
+ # CA1847: Use char literal for a single character lookup
354
+ dotnet_diagnostic.CA1847.severity = none
355
+
356
+ # CA1848: Use the LoggerMessage delegates
357
+ dotnet_diagnostic.CA1848.severity = none
358
+
359
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
360
+ dotnet_diagnostic.CA1850.severity = none
361
+
362
+ # CA1852: Seal internal types
363
+ dotnet_diagnostic.CA1852.severity = none
364
+
365
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
366
+ dotnet_diagnostic.CA1853.severity = none
367
+
368
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
369
+ dotnet_diagnostic.CA1854.severity = none
370
+
371
+ # CA1855: Prefer 'Clear' over 'Fill'
372
+ dotnet_diagnostic.CA1855.severity = none
373
+
374
+ # CA1856: Incorrect usage of ConstantExpected attribute
375
+ dotnet_diagnostic.CA1856.severity = none
376
+
377
+ # CA1857: A constant is expected for the parameter
378
+ dotnet_diagnostic.CA1857.severity = none
379
+
380
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
381
+ dotnet_diagnostic.CA1858.severity = none
382
+
383
+ # CA1859: Use concrete types when possible for improved performance
384
+ dotnet_diagnostic.CA1859.severity = none
385
+
386
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
387
+ dotnet_diagnostic.CA1860.severity = none
388
+
389
+ # CA1861: Avoid constant arrays as arguments
390
+ dotnet_diagnostic.CA1861.severity = none
391
+
392
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
393
+ dotnet_diagnostic.CA1862.severity = none
394
+
395
+ # CA1863: Use 'CompositeFormat'
396
+ dotnet_diagnostic.CA1863.severity = none
397
+
398
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
399
+ dotnet_diagnostic.CA1864.severity = none
400
+
401
+ # CA1865: Use char overload
402
+ dotnet_diagnostic.CA1865.severity = none
403
+
404
+ # CA1866: Use char overload
405
+ dotnet_diagnostic.CA1866.severity = none
406
+
407
+ # CA1868: Unnecessary call to 'Contains(item)'
408
+ dotnet_diagnostic.CA1868.severity = none
409
+
410
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
411
+ dotnet_diagnostic.CA1869.severity = none
412
+
413
+ # CA1870: Use a cached 'SearchValues' instance
414
+ dotnet_diagnostic.CA1870.severity = none
415
+
416
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
417
+ dotnet_diagnostic.CA1871.severity = none
418
+
419
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
420
+ dotnet_diagnostic.CA1872.severity = none
421
+
422
+ # CA2000: Dispose objects before losing scope
423
+ dotnet_diagnostic.CA2000.severity = warning
424
+
425
+ # CA2002: Do not lock on objects with weak identity
426
+ dotnet_diagnostic.CA2002.severity = warning
427
+
428
+ # CA2007: Consider calling ConfigureAwait on the awaited task
429
+ dotnet_diagnostic.CA2007.severity = warning
430
+
431
+ # CA2008: Do not create tasks without passing a TaskScheduler
432
+ dotnet_diagnostic.CA2008.severity = warning
433
+
434
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
435
+ dotnet_diagnostic.CA2009.severity = warning
436
+
437
+ # CA2011: Avoid infinite recursion
438
+ dotnet_diagnostic.CA2011.severity = warning
439
+
440
+ # CA2012: Use ValueTasks correctly
441
+ dotnet_diagnostic.CA2012.severity = warning
442
+
443
+ # CA2016: Forward the 'CancellationToken' parameter to methods
444
+ dotnet_diagnostic.CA2016.severity = warning
445
+
446
+ # CA2017: Parameter count mismatch
447
+ dotnet_diagnostic.CA2017.severity = none
448
+
449
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
450
+ dotnet_diagnostic.CA2018.severity = none
451
+
452
+ # CA2019: Improper 'ThreadStatic' field initialization
453
+ dotnet_diagnostic.CA2019.severity = none
454
+
455
+ # CA2020: Prevent behavioral change
456
+ dotnet_diagnostic.CA2020.severity = none
457
+
458
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
459
+ dotnet_diagnostic.CA2021.severity = none
460
+
461
+ # CA2022: Avoid inexact read with 'Stream.Read'
462
+ dotnet_diagnostic.CA2022.severity = none
463
+
464
+ # CA2100: Review SQL queries for security vulnerabilities
465
+ dotnet_diagnostic.CA2100.severity = warning
466
+
467
+ # CA2101: Specify marshaling for P/Invoke string arguments
468
+ dotnet_diagnostic.CA2101.severity = warning
469
+
470
+ # CA2119: Seal methods that satisfy private interfaces
471
+ dotnet_diagnostic.CA2119.severity = warning
472
+
473
+ # CA2153: Do Not Catch Corrupted State Exceptions
474
+ dotnet_diagnostic.CA2153.severity = warning
475
+
476
+ # CA2201: Do not raise reserved exception types
477
+ dotnet_diagnostic.CA2201.severity = warning
478
+
479
+ # CA2207: Initialize value type static fields inline
480
+ dotnet_diagnostic.CA2207.severity = warning
481
+
482
+ # CA2208: Instantiate argument exceptions correctly
483
+ dotnet_diagnostic.CA2208.severity = warning
484
+
485
+ # CA2211: Non-constant fields should not be visible
486
+ dotnet_diagnostic.CA2211.severity = warning
487
+
488
+ # CA2213: Disposable fields should be disposed
489
+ dotnet_diagnostic.CA2213.severity = warning
490
+
491
+ # CA2214: Do not call overridable methods in constructors
492
+ dotnet_diagnostic.CA2214.severity = warning
493
+
494
+ # CA2215: Dispose methods should call base class dispose
495
+ dotnet_diagnostic.CA2215.severity = warning
496
+
497
+ # CA2216: Disposable types should declare finalizer
498
+ dotnet_diagnostic.CA2216.severity = warning
499
+
500
+ # CA2217: Do not mark enums with FlagsAttribute
501
+ dotnet_diagnostic.CA2217.severity = warning
502
+
503
+ # CA2218: Override GetHashCode on overriding Equals
504
+ dotnet_diagnostic.CA2218.severity = warning
505
+
506
+ # CA2219: Do not raise exceptions in finally clauses
507
+ dotnet_diagnostic.CA2219.severity = warning
508
+
509
+ # CA2224: Override Equals on overloading operator equals
510
+ dotnet_diagnostic.CA2224.severity = warning
511
+
512
+ # CA2225: Operator overloads have named alternates
513
+ dotnet_diagnostic.CA2225.severity = warning
514
+
515
+ # CA2226: Operators should have symmetrical overloads
516
+ dotnet_diagnostic.CA2226.severity = warning
517
+
518
+ # CA2227: Collection properties should be read only
519
+ dotnet_diagnostic.CA2227.severity = warning
520
+
521
+ # CA2231: Overload operator equals on overriding value type Equals
522
+ dotnet_diagnostic.CA2231.severity = warning
523
+
524
+ # CA2234: Pass system uri objects instead of strings
525
+ dotnet_diagnostic.CA2234.severity = warning
526
+
527
+ # CA2235: Mark all non-serializable fields
528
+ dotnet_diagnostic.CA2235.severity = warning
529
+
530
+ # CA2237: Mark ISerializable types with serializable
531
+ dotnet_diagnostic.CA2237.severity = warning
532
+
533
+ # CA2241: Provide correct arguments to formatting methods
534
+ dotnet_diagnostic.CA2241.severity = warning
535
+
536
+ # CA2242: Test for NaN correctly
537
+ dotnet_diagnostic.CA2242.severity = warning
538
+
539
+ # CA2243: Attribute string literals should parse correctly
540
+ dotnet_diagnostic.CA2243.severity = warning
541
+
542
+ # CA2244: Do not duplicate indexed element initializations
543
+ dotnet_diagnostic.CA2244.severity = warning
544
+
545
+ # CA2245: Do not assign a property to itself
546
+ dotnet_diagnostic.CA2245.severity = warning
547
+
548
+ # CA2246: Assigning symbol and its member in the same statement
549
+ dotnet_diagnostic.CA2246.severity = warning
550
+
551
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
552
+ dotnet_diagnostic.CA2248.severity = warning
553
+
554
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
555
+ dotnet_diagnostic.CA2249.severity = warning
556
+
557
+ # CA2250: Use 'ThrowIfCancellationRequested'
558
+ dotnet_diagnostic.CA2250.severity = none
559
+
560
+ # CA2251: Use 'string.Equals'
561
+ dotnet_diagnostic.CA2251.severity = none
562
+
563
+ # CA2252: This API requires opting into preview features
564
+ dotnet_diagnostic.CA2252.severity = none
565
+
566
+ # CA2253: Named placeholders should not be numeric values
567
+ dotnet_diagnostic.CA2253.severity = none
568
+
569
+ # CA2254: Template should be a static expression
570
+ dotnet_diagnostic.CA2254.severity = none
571
+
572
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
573
+ dotnet_diagnostic.CA2255.severity = none
574
+
575
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
576
+ dotnet_diagnostic.CA2256.severity = none
577
+
578
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
579
+ dotnet_diagnostic.CA2257.severity = none
580
+
581
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
582
+ dotnet_diagnostic.CA2258.severity = none
583
+
584
+ # CA2259: 'ThreadStatic' only affects static fields
585
+ dotnet_diagnostic.CA2259.severity = none
586
+
587
+ # CA2260: Use correct type parameter
588
+ dotnet_diagnostic.CA2260.severity = none
589
+
590
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
591
+ dotnet_diagnostic.CA2261.severity = none
592
+
593
+ # CA2262: Set 'MaxResponseHeadersLength' properly
594
+ dotnet_diagnostic.CA2262.severity = none
595
+
596
+ # CA2263: Prefer generic overload when type is known
597
+ dotnet_diagnostic.CA2263.severity = none
598
+
599
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
600
+ dotnet_diagnostic.CA2264.severity = none
601
+
602
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
603
+ dotnet_diagnostic.CA2265.severity = none
604
+
605
+ # CA2300: Do not use insecure deserializer BinaryFormatter
606
+ dotnet_diagnostic.CA2300.severity = warning
607
+
608
+ # CA2301: Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder
609
+ dotnet_diagnostic.CA2301.severity = warning
610
+
611
+ # CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize
612
+ dotnet_diagnostic.CA2302.severity = warning
613
+
614
+ # CA2305: Do not use insecure deserializer LosFormatter
615
+ dotnet_diagnostic.CA2305.severity = warning
616
+
617
+ # CA2310: Do not use insecure deserializer NetDataContractSerializer
618
+ dotnet_diagnostic.CA2310.severity = warning
619
+
620
+ # CA2311: Do not deserialize without first setting NetDataContractSerializer.Binder
621
+ dotnet_diagnostic.CA2311.severity = warning
622
+
623
+ # CA2312: Ensure NetDataContractSerializer.Binder is set before deserializing
624
+ dotnet_diagnostic.CA2312.severity = warning
625
+
626
+ # CA2315: Do not use insecure deserializer ObjectStateFormatter
627
+ dotnet_diagnostic.CA2315.severity = warning
628
+
629
+ # CA2321: Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver
630
+ dotnet_diagnostic.CA2321.severity = warning
631
+
632
+ # CA2322: Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing
633
+ dotnet_diagnostic.CA2322.severity = warning
634
+
635
+ # CA2326: Do not use TypeNameHandling values other than None
636
+ dotnet_diagnostic.CA2326.severity = warning
637
+
638
+ # CA2327: Do not use insecure JsonSerializerSettings
639
+ dotnet_diagnostic.CA2327.severity = warning
640
+
641
+ # CA2328: Ensure that JsonSerializerSettings are secure
642
+ dotnet_diagnostic.CA2328.severity = warning
643
+
644
+ # CA2329: Do not deserialize with JsonSerializer using an insecure configuration
645
+ dotnet_diagnostic.CA2329.severity = warning
646
+
647
+ # CA2330: Ensure that JsonSerializer has a secure configuration when deserializing
648
+ dotnet_diagnostic.CA2330.severity = warning
649
+
650
+ # CA2350: Do not use DataTable.ReadXml() with untrusted data
651
+ dotnet_diagnostic.CA2350.severity = warning
652
+
653
+ # CA2351: Do not use DataSet.ReadXml() with untrusted data
654
+ dotnet_diagnostic.CA2351.severity = warning
655
+
656
+ # CA2352: Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks
657
+ dotnet_diagnostic.CA2352.severity = warning
658
+
659
+ # CA2353: Unsafe DataSet or DataTable in serializable type
660
+ dotnet_diagnostic.CA2353.severity = warning
661
+
662
+ # CA2354: Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks
663
+ dotnet_diagnostic.CA2354.severity = warning
664
+
665
+ # CA2355: Unsafe DataSet or DataTable type found in deserializable object graph
666
+ dotnet_diagnostic.CA2355.severity = warning
667
+
668
+ # CA2356: Unsafe DataSet or DataTable type in web deserializable object graph
669
+ dotnet_diagnostic.CA2356.severity = warning
670
+
671
+ # CA2361: Ensure auto-generated class containing DataSet.ReadXml() is not used with untrusted data
672
+ dotnet_diagnostic.CA2361.severity = warning
673
+
674
+ # CA2362: Unsafe DataSet or DataTable in auto-generated serializable type can be vulnerable to remote code execution attacks
675
+ dotnet_diagnostic.CA2362.severity = warning
676
+
677
+ # CA3001: Review code for SQL injection vulnerabilities
678
+ dotnet_diagnostic.CA3001.severity = warning
679
+
680
+ # CA3002: Review code for XSS vulnerabilities
681
+ dotnet_diagnostic.CA3002.severity = warning
682
+
683
+ # CA3003: Review code for file path injection vulnerabilities
684
+ dotnet_diagnostic.CA3003.severity = warning
685
+
686
+ # CA3004: Review code for information disclosure vulnerabilities
687
+ dotnet_diagnostic.CA3004.severity = warning
688
+
689
+ # CA3005: Review code for LDAP injection vulnerabilities
690
+ dotnet_diagnostic.CA3005.severity = warning
691
+
692
+ # CA3006: Review code for process command injection vulnerabilities
693
+ dotnet_diagnostic.CA3006.severity = warning
694
+
695
+ # CA3007: Review code for open redirect vulnerabilities
696
+ dotnet_diagnostic.CA3007.severity = warning
697
+
698
+ # CA3008: Review code for XPath injection vulnerabilities
699
+ dotnet_diagnostic.CA3008.severity = warning
700
+
701
+ # CA3009: Review code for XML injection vulnerabilities
702
+ dotnet_diagnostic.CA3009.severity = warning
703
+
704
+ # CA3010: Review code for XAML injection vulnerabilities
705
+ dotnet_diagnostic.CA3010.severity = warning
706
+
707
+ # CA3011: Review code for DLL injection vulnerabilities
708
+ dotnet_diagnostic.CA3011.severity = warning
709
+
710
+ # CA3012: Review code for regex injection vulnerabilities
711
+ dotnet_diagnostic.CA3012.severity = warning
712
+
713
+ # CA3061: Do Not Add Schema By URL
714
+ dotnet_diagnostic.CA3061.severity = warning
715
+
716
+ # CA3075: Insecure DTD processing in XML
717
+ dotnet_diagnostic.CA3075.severity = warning
718
+
719
+ # CA3076: Insecure XSLT script processing
720
+ dotnet_diagnostic.CA3076.severity = warning
721
+
722
+ # CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader
723
+ dotnet_diagnostic.CA3077.severity = warning
724
+
725
+ # CA3147: Mark Verb Handlers With Validate Antiforgery Token
726
+ dotnet_diagnostic.CA3147.severity = warning
727
+
728
+ # CA5350: Do Not Use Weak Cryptographic Algorithms
729
+ dotnet_diagnostic.CA5350.severity = warning
730
+
731
+ # CA5351: Do Not Use Broken Cryptographic Algorithms
732
+ dotnet_diagnostic.CA5351.severity = warning
733
+
734
+ # CA5358: Review cipher mode usage with cryptography experts
735
+ dotnet_diagnostic.CA5358.severity = warning
736
+
737
+ # CA5359: Do Not Disable Certificate Validation
738
+ dotnet_diagnostic.CA5359.severity = warning
739
+
740
+ # CA5360: Do Not Call Dangerous Methods In Deserialization
741
+ dotnet_diagnostic.CA5360.severity = warning
742
+
743
+ # CA5361: Do Not Disable SChannel Use of Strong Crypto
744
+ dotnet_diagnostic.CA5361.severity = warning
745
+
746
+ # CA5362: Potential reference cycle in deserialized object graph
747
+ dotnet_diagnostic.CA5362.severity = warning
748
+
749
+ # CA5363: Do Not Disable Request Validation
750
+ dotnet_diagnostic.CA5363.severity = warning
751
+
752
+ # CA5364: Do Not Use Deprecated Security Protocols
753
+ dotnet_diagnostic.CA5364.severity = warning
754
+
755
+ # CA5365: Do Not Disable HTTP Header Checking
756
+ dotnet_diagnostic.CA5365.severity = warning
757
+
758
+ # CA5366: Use XmlReader for 'DataSet.ReadXml()'
759
+ dotnet_diagnostic.CA5366.severity = warning
760
+
761
+ # CA5367: Do Not Serialize Types With Pointer Fields
762
+ dotnet_diagnostic.CA5367.severity = warning
763
+
764
+ # CA5368: Set ViewStateUserKey For Classes Derived From Page
765
+ dotnet_diagnostic.CA5368.severity = warning
766
+
767
+ # CA5369: Use XmlReader for 'XmlSerializer.Deserialize()'
768
+ dotnet_diagnostic.CA5369.severity = warning
769
+
770
+ # CA5370: Use XmlReader for XmlValidatingReader constructor
771
+ dotnet_diagnostic.CA5370.severity = warning
772
+
773
+ # CA5371: Use XmlReader for 'XmlSchema.Read()'
774
+ dotnet_diagnostic.CA5371.severity = warning
775
+
776
+ # CA5372: Use XmlReader for XPathDocument constructor
777
+ dotnet_diagnostic.CA5372.severity = warning
778
+
779
+ # CA5373: Do not use obsolete key derivation function
780
+ dotnet_diagnostic.CA5373.severity = warning
781
+
782
+ # CA5374: Do Not Use XslTransform
783
+ dotnet_diagnostic.CA5374.severity = warning
784
+
785
+ # CA5375: Do Not Use Account Shared Access Signature
786
+ dotnet_diagnostic.CA5375.severity = warning
787
+
788
+ # CA5376: Use SharedAccessProtocol HttpsOnly
789
+ dotnet_diagnostic.CA5376.severity = warning
790
+
791
+ # CA5377: Use Container Level Access Policy
792
+ dotnet_diagnostic.CA5377.severity = warning
793
+
794
+ # CA5378: Do not disable ServicePointManagerSecurityProtocols
795
+ dotnet_diagnostic.CA5378.severity = warning
796
+
797
+ # CA5379: Ensure Key Derivation Function algorithm is sufficiently strong
798
+ dotnet_diagnostic.CA5379.severity = warning
799
+
800
+ # CA5380: Do Not Add Certificates To Root Store
801
+ dotnet_diagnostic.CA5380.severity = warning
802
+
803
+ # CA5381: Ensure Certificates Are Not Added To Root Store
804
+ dotnet_diagnostic.CA5381.severity = warning
805
+
806
+ # CA5382: Use Secure Cookies In ASP.NET Core
807
+ dotnet_diagnostic.CA5382.severity = warning
808
+
809
+ # CA5383: Ensure Use Secure Cookies In ASP.NET Core
810
+ dotnet_diagnostic.CA5383.severity = warning
811
+
812
+ # CA5384: Do Not Use Digital Signature Algorithm (DSA)
813
+ dotnet_diagnostic.CA5384.severity = warning
814
+
815
+ # CA5385: Use Rivest-Shamir-Adleman (RSA) Algorithm With Sufficient Key Size
816
+ dotnet_diagnostic.CA5385.severity = warning
817
+
818
+ # CA5386: Avoid hardcoding SecurityProtocolType value
819
+ dotnet_diagnostic.CA5386.severity = warning
820
+
821
+ # CA5387: Do Not Use Weak Key Derivation Function With Insufficient Iteration Count
822
+ dotnet_diagnostic.CA5387.severity = warning
823
+
824
+ # CA5388: Ensure Sufficient Iteration Count When Using Weak Key Derivation Function
825
+ dotnet_diagnostic.CA5388.severity = warning
826
+
827
+ # CA5389: Do Not Add Archive Item's Path To The Target File System Path
828
+ dotnet_diagnostic.CA5389.severity = warning
829
+
830
+ # CA5390: Do not hard-code encryption key
831
+ dotnet_diagnostic.CA5390.severity = warning
832
+
833
+ # CA5391: Use antiforgery tokens in ASP.NET Core MVC controllers
834
+ dotnet_diagnostic.CA5391.severity = warning
835
+
836
+ # CA5392: Use DefaultDllImportSearchPaths attribute for P/Invokes
837
+ dotnet_diagnostic.CA5392.severity = warning
838
+
839
+ # CA5393: Do not use unsafe DllImportSearchPath value
840
+ dotnet_diagnostic.CA5393.severity = warning
841
+
842
+ # CA5394: Do not use insecure randomness
843
+ dotnet_diagnostic.CA5394.severity = warning
844
+
845
+ # CA5395: Miss HttpVerb attribute for action methods
846
+ dotnet_diagnostic.CA5395.severity = warning
847
+
848
+ # CA5396: Set HttpOnly to true for HttpCookie
849
+ dotnet_diagnostic.CA5396.severity = warning
850
+
851
+ # CA5397: Do not use deprecated SslProtocols values
852
+ dotnet_diagnostic.CA5397.severity = warning
853
+
854
+ # CA5398: Avoid hardcoded SslProtocols values
855
+ dotnet_diagnostic.CA5398.severity = warning
856
+
857
+ # CA5399: HttpClients should enable certificate revocation list checks
858
+ dotnet_diagnostic.CA5399.severity = warning
859
+
860
+ # CA5400: Ensure HttpClient certificate revocation list check is not disabled
861
+ dotnet_diagnostic.CA5400.severity = warning
862
+
863
+ # CA5401: Do not use CreateEncryptor with non-default IV
864
+ dotnet_diagnostic.CA5401.severity = warning
865
+
866
+ # CA5402: Use CreateEncryptor with the default IV
867
+ dotnet_diagnostic.CA5402.severity = warning
868
+
869
+ # CA5403: Do not hard-code certificate
870
+ dotnet_diagnostic.CA5403.severity = warning
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_all_warnaserror.globalconfig ADDED
@@ -0,0 +1,894 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '5.0' release with 'All' analysis mode escalated to 'error' severity
4
+ # Description: Rules with enabled-by-default state from '5.0' release with 'All' analysis mode. Rules that are first released in a version later than '5.0' are disabled. Enabled rules with 'warning' severity are escalated to 'error' severity to respect 'CodeAnalysisTreatWarningsAsErrors' MSBuild property.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1000: Do not declare static members on generic types
12
+ dotnet_diagnostic.CA1000.severity = error
13
+
14
+ # CA1001: Types that own disposable fields should be disposable
15
+ dotnet_diagnostic.CA1001.severity = error
16
+
17
+ # CA1002: Do not expose generic lists
18
+ dotnet_diagnostic.CA1002.severity = error
19
+
20
+ # CA1003: Use generic event handler instances
21
+ dotnet_diagnostic.CA1003.severity = error
22
+
23
+ # CA1008: Enums should have zero value
24
+ dotnet_diagnostic.CA1008.severity = error
25
+
26
+ # CA1010: Generic interface should also be implemented
27
+ dotnet_diagnostic.CA1010.severity = error
28
+
29
+ # CA1012: Abstract types should not have public constructors
30
+ dotnet_diagnostic.CA1012.severity = error
31
+
32
+ # CA1016: Mark assemblies with assembly version
33
+ dotnet_diagnostic.CA1016.severity = error
34
+
35
+ # CA1018: Mark attributes with AttributeUsageAttribute
36
+ dotnet_diagnostic.CA1018.severity = error
37
+
38
+ # CA1019: Define accessors for attribute arguments
39
+ dotnet_diagnostic.CA1019.severity = error
40
+
41
+ # CA1024: Use properties where appropriate
42
+ dotnet_diagnostic.CA1024.severity = error
43
+
44
+ # CA1027: Mark enums with FlagsAttribute
45
+ dotnet_diagnostic.CA1027.severity = error
46
+
47
+ # CA1028: Enum Storage should be Int32
48
+ dotnet_diagnostic.CA1028.severity = error
49
+
50
+ # CA1030: Use events where appropriate
51
+ dotnet_diagnostic.CA1030.severity = error
52
+
53
+ # CA1031: Do not catch general exception types
54
+ dotnet_diagnostic.CA1031.severity = error
55
+
56
+ # CA1032: Implement standard exception constructors
57
+ dotnet_diagnostic.CA1032.severity = error
58
+
59
+ # CA1033: Interface methods should be callable by child types
60
+ dotnet_diagnostic.CA1033.severity = error
61
+
62
+ # CA1034: Nested types should not be visible
63
+ dotnet_diagnostic.CA1034.severity = error
64
+
65
+ # CA1036: Override methods on comparable types
66
+ dotnet_diagnostic.CA1036.severity = error
67
+
68
+ # CA1040: Avoid empty interfaces
69
+ dotnet_diagnostic.CA1040.severity = error
70
+
71
+ # CA1041: Provide ObsoleteAttribute message
72
+ dotnet_diagnostic.CA1041.severity = error
73
+
74
+ # CA1043: Use Integral Or String Argument For Indexers
75
+ dotnet_diagnostic.CA1043.severity = error
76
+
77
+ # CA1044: Properties should not be write only
78
+ dotnet_diagnostic.CA1044.severity = error
79
+
80
+ # CA1046: Do not overload equality operator on reference types
81
+ dotnet_diagnostic.CA1046.severity = error
82
+
83
+ # CA1047: Do not declare protected member in sealed type
84
+ dotnet_diagnostic.CA1047.severity = error
85
+
86
+ # CA1050: Declare types in namespaces
87
+ dotnet_diagnostic.CA1050.severity = error
88
+
89
+ # CA1051: Do not declare visible instance fields
90
+ dotnet_diagnostic.CA1051.severity = error
91
+
92
+ # CA1052: Static holder types should be Static or NotInheritable
93
+ dotnet_diagnostic.CA1052.severity = error
94
+
95
+ # CA1054: URI-like parameters should not be strings
96
+ dotnet_diagnostic.CA1054.severity = error
97
+
98
+ # CA1055: URI-like return values should not be strings
99
+ dotnet_diagnostic.CA1055.severity = error
100
+
101
+ # CA1056: URI-like properties should not be strings
102
+ dotnet_diagnostic.CA1056.severity = error
103
+
104
+ # CA1058: Types should not extend certain base types
105
+ dotnet_diagnostic.CA1058.severity = error
106
+
107
+ # CA1061: Do not hide base class methods
108
+ dotnet_diagnostic.CA1061.severity = error
109
+
110
+ # CA1062: Validate arguments of public methods
111
+ dotnet_diagnostic.CA1062.severity = error
112
+
113
+ # CA1063: Implement IDisposable Correctly
114
+ dotnet_diagnostic.CA1063.severity = error
115
+
116
+ # CA1064: Exceptions should be public
117
+ dotnet_diagnostic.CA1064.severity = error
118
+
119
+ # CA1065: Do not raise exceptions in unexpected locations
120
+ dotnet_diagnostic.CA1065.severity = error
121
+
122
+ # CA1066: Implement IEquatable when overriding Object.Equals
123
+ dotnet_diagnostic.CA1066.severity = error
124
+
125
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
126
+ dotnet_diagnostic.CA1067.severity = error
127
+
128
+ # CA1068: CancellationToken parameters must come last
129
+ dotnet_diagnostic.CA1068.severity = error
130
+
131
+ # CA1069: Enums values should not be duplicated
132
+ dotnet_diagnostic.CA1069.severity = error
133
+
134
+ # CA1070: Do not declare event fields as virtual
135
+ dotnet_diagnostic.CA1070.severity = error
136
+
137
+ # CA1200: Avoid using cref tags with a prefix
138
+ dotnet_diagnostic.CA1200.severity = error
139
+
140
+ # CA1303: Do not pass literals as localized parameters
141
+ dotnet_diagnostic.CA1303.severity = error
142
+
143
+ # CA1304: Specify CultureInfo
144
+ dotnet_diagnostic.CA1304.severity = error
145
+
146
+ # CA1305: Specify IFormatProvider
147
+ dotnet_diagnostic.CA1305.severity = error
148
+
149
+ # CA1307: Specify StringComparison for clarity
150
+ dotnet_diagnostic.CA1307.severity = error
151
+
152
+ # CA1308: Normalize strings to uppercase
153
+ dotnet_diagnostic.CA1308.severity = error
154
+
155
+ # CA1309: Use ordinal string comparison
156
+ dotnet_diagnostic.CA1309.severity = error
157
+
158
+ # CA1310: Specify StringComparison for correctness
159
+ dotnet_diagnostic.CA1310.severity = error
160
+
161
+ # CA1311: Specify a culture or use an invariant version
162
+ dotnet_diagnostic.CA1311.severity = none
163
+
164
+ # CA1401: P/Invokes should not be visible
165
+ dotnet_diagnostic.CA1401.severity = error
166
+
167
+ # CA1416: Validate platform compatibility
168
+ dotnet_diagnostic.CA1416.severity = error
169
+
170
+ # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes
171
+ dotnet_diagnostic.CA1417.severity = error
172
+
173
+ # CA1418: Use valid platform string
174
+ dotnet_diagnostic.CA1418.severity = none
175
+
176
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
177
+ dotnet_diagnostic.CA1419.severity = none
178
+
179
+ # CA1420: Property, type, or attribute requires runtime marshalling
180
+ dotnet_diagnostic.CA1420.severity = none
181
+
182
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
183
+ dotnet_diagnostic.CA1421.severity = none
184
+
185
+ # CA1422: Validate platform compatibility
186
+ dotnet_diagnostic.CA1422.severity = none
187
+
188
+ # CA1507: Use nameof to express symbol names
189
+ dotnet_diagnostic.CA1507.severity = error
190
+
191
+ # CA1508: Avoid dead conditional code
192
+ dotnet_diagnostic.CA1508.severity = error
193
+
194
+ # CA1510: Use ArgumentNullException throw helper
195
+ dotnet_diagnostic.CA1510.severity = none
196
+
197
+ # CA1511: Use ArgumentException throw helper
198
+ dotnet_diagnostic.CA1511.severity = none
199
+
200
+ # CA1512: Use ArgumentOutOfRangeException throw helper
201
+ dotnet_diagnostic.CA1512.severity = none
202
+
203
+ # CA1513: Use ObjectDisposedException throw helper
204
+ dotnet_diagnostic.CA1513.severity = none
205
+
206
+ # CA1514: Avoid redundant length argument
207
+ dotnet_diagnostic.CA1514.severity = none
208
+
209
+ # CA1700: Do not name enum values 'Reserved'
210
+ dotnet_diagnostic.CA1700.severity = error
211
+
212
+ # CA1707: Identifiers should not contain underscores
213
+ dotnet_diagnostic.CA1707.severity = error
214
+
215
+ # CA1708: Identifiers should differ by more than case
216
+ dotnet_diagnostic.CA1708.severity = error
217
+
218
+ # CA1710: Identifiers should have correct suffix
219
+ dotnet_diagnostic.CA1710.severity = error
220
+
221
+ # CA1711: Identifiers should not have incorrect suffix
222
+ dotnet_diagnostic.CA1711.severity = error
223
+
224
+ # CA1712: Do not prefix enum values with type name
225
+ dotnet_diagnostic.CA1712.severity = error
226
+
227
+ # CA1713: Events should not have 'Before' or 'After' prefix
228
+ dotnet_diagnostic.CA1713.severity = error
229
+
230
+ # CA1715: Identifiers should have correct prefix
231
+ dotnet_diagnostic.CA1715.severity = error
232
+
233
+ # CA1716: Identifiers should not match keywords
234
+ dotnet_diagnostic.CA1716.severity = error
235
+
236
+ # CA1720: Identifier contains type name
237
+ dotnet_diagnostic.CA1720.severity = error
238
+
239
+ # CA1721: Property names should not match get methods
240
+ dotnet_diagnostic.CA1721.severity = error
241
+
242
+ # CA1724: Type names should not match namespaces
243
+ dotnet_diagnostic.CA1724.severity = error
244
+
245
+ # CA1725: Parameter names should match base declaration
246
+ dotnet_diagnostic.CA1725.severity = error
247
+
248
+ # CA1727: Use PascalCase for named placeholders
249
+ dotnet_diagnostic.CA1727.severity = none
250
+
251
+ # CA1802: Use literals where appropriate
252
+ dotnet_diagnostic.CA1802.severity = error
253
+
254
+ # CA1805: Do not initialize unnecessarily
255
+ dotnet_diagnostic.CA1805.severity = error
256
+
257
+ # CA1806: Do not ignore method results
258
+ dotnet_diagnostic.CA1806.severity = error
259
+
260
+ # CA1810: Initialize reference type static fields inline
261
+ dotnet_diagnostic.CA1810.severity = error
262
+
263
+ # CA1812: Avoid uninstantiated internal classes
264
+ dotnet_diagnostic.CA1812.severity = error
265
+
266
+ # CA1813: Avoid unsealed attributes
267
+ dotnet_diagnostic.CA1813.severity = error
268
+
269
+ # CA1814: Prefer jagged arrays over multidimensional
270
+ dotnet_diagnostic.CA1814.severity = error
271
+
272
+ # CA1815: Override equals and operator equals on value types
273
+ dotnet_diagnostic.CA1815.severity = error
274
+
275
+ # CA1816: Dispose methods should call SuppressFinalize
276
+ dotnet_diagnostic.CA1816.severity = error
277
+
278
+ # CA1819: Properties should not return arrays
279
+ dotnet_diagnostic.CA1819.severity = error
280
+
281
+ # CA1820: Test for empty strings using string length
282
+ dotnet_diagnostic.CA1820.severity = error
283
+
284
+ # CA1821: Remove empty Finalizers
285
+ dotnet_diagnostic.CA1821.severity = error
286
+
287
+ # CA1822: Mark members as static
288
+ dotnet_diagnostic.CA1822.severity = error
289
+
290
+ # CA1823: Avoid unused private fields
291
+ dotnet_diagnostic.CA1823.severity = error
292
+
293
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
294
+ dotnet_diagnostic.CA1824.severity = error
295
+
296
+ # CA1825: Avoid zero-length array allocations
297
+ dotnet_diagnostic.CA1825.severity = error
298
+
299
+ # CA1826: Do not use Enumerable methods on indexable collections
300
+ dotnet_diagnostic.CA1826.severity = error
301
+
302
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
303
+ dotnet_diagnostic.CA1827.severity = error
304
+
305
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
306
+ dotnet_diagnostic.CA1828.severity = error
307
+
308
+ # CA1829: Use Length/Count property instead of Count() when available
309
+ dotnet_diagnostic.CA1829.severity = error
310
+
311
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
312
+ dotnet_diagnostic.CA1830.severity = error
313
+
314
+ # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
315
+ dotnet_diagnostic.CA1831.severity = error
316
+
317
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
318
+ dotnet_diagnostic.CA1832.severity = error
319
+
320
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
321
+ dotnet_diagnostic.CA1833.severity = error
322
+
323
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
324
+ dotnet_diagnostic.CA1834.severity = error
325
+
326
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
327
+ dotnet_diagnostic.CA1835.severity = error
328
+
329
+ # CA1836: Prefer IsEmpty over Count
330
+ dotnet_diagnostic.CA1836.severity = error
331
+
332
+ # CA1837: Use 'Environment.ProcessId'
333
+ dotnet_diagnostic.CA1837.severity = error
334
+
335
+ # CA1838: Avoid 'StringBuilder' parameters for P/Invokes
336
+ dotnet_diagnostic.CA1838.severity = error
337
+
338
+ # CA1839: Use 'Environment.ProcessPath'
339
+ dotnet_diagnostic.CA1839.severity = none
340
+
341
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
342
+ dotnet_diagnostic.CA1840.severity = none
343
+
344
+ # CA1841: Prefer Dictionary.Contains methods
345
+ dotnet_diagnostic.CA1841.severity = none
346
+
347
+ # CA1842: Do not use 'WhenAll' with a single task
348
+ dotnet_diagnostic.CA1842.severity = none
349
+
350
+ # CA1843: Do not use 'WaitAll' with a single task
351
+ dotnet_diagnostic.CA1843.severity = none
352
+
353
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
354
+ dotnet_diagnostic.CA1844.severity = none
355
+
356
+ # CA1845: Use span-based 'string.Concat'
357
+ dotnet_diagnostic.CA1845.severity = none
358
+
359
+ # CA1846: Prefer 'AsSpan' over 'Substring'
360
+ dotnet_diagnostic.CA1846.severity = none
361
+
362
+ # CA1847: Use char literal for a single character lookup
363
+ dotnet_diagnostic.CA1847.severity = none
364
+
365
+ # CA1848: Use the LoggerMessage delegates
366
+ dotnet_diagnostic.CA1848.severity = none
367
+
368
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
369
+ dotnet_diagnostic.CA1850.severity = none
370
+
371
+ # CA1852: Seal internal types
372
+ dotnet_diagnostic.CA1852.severity = none
373
+
374
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
375
+ dotnet_diagnostic.CA1853.severity = none
376
+
377
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
378
+ dotnet_diagnostic.CA1854.severity = none
379
+
380
+ # CA1855: Prefer 'Clear' over 'Fill'
381
+ dotnet_diagnostic.CA1855.severity = none
382
+
383
+ # CA1856: Incorrect usage of ConstantExpected attribute
384
+ dotnet_diagnostic.CA1856.severity = none
385
+
386
+ # CA1857: A constant is expected for the parameter
387
+ dotnet_diagnostic.CA1857.severity = none
388
+
389
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
390
+ dotnet_diagnostic.CA1858.severity = none
391
+
392
+ # CA1859: Use concrete types when possible for improved performance
393
+ dotnet_diagnostic.CA1859.severity = none
394
+
395
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
396
+ dotnet_diagnostic.CA1860.severity = none
397
+
398
+ # CA1861: Avoid constant arrays as arguments
399
+ dotnet_diagnostic.CA1861.severity = none
400
+
401
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
402
+ dotnet_diagnostic.CA1862.severity = none
403
+
404
+ # CA1863: Use 'CompositeFormat'
405
+ dotnet_diagnostic.CA1863.severity = none
406
+
407
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
408
+ dotnet_diagnostic.CA1864.severity = none
409
+
410
+ # CA1865: Use char overload
411
+ dotnet_diagnostic.CA1865.severity = none
412
+
413
+ # CA1866: Use char overload
414
+ dotnet_diagnostic.CA1866.severity = none
415
+
416
+ # CA1868: Unnecessary call to 'Contains(item)'
417
+ dotnet_diagnostic.CA1868.severity = none
418
+
419
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
420
+ dotnet_diagnostic.CA1869.severity = none
421
+
422
+ # CA1870: Use a cached 'SearchValues' instance
423
+ dotnet_diagnostic.CA1870.severity = none
424
+
425
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
426
+ dotnet_diagnostic.CA1871.severity = none
427
+
428
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
429
+ dotnet_diagnostic.CA1872.severity = none
430
+
431
+ # CA2000: Dispose objects before losing scope
432
+ dotnet_diagnostic.CA2000.severity = error
433
+
434
+ # CA2002: Do not lock on objects with weak identity
435
+ dotnet_diagnostic.CA2002.severity = error
436
+
437
+ # CA2007: Consider calling ConfigureAwait on the awaited task
438
+ dotnet_diagnostic.CA2007.severity = error
439
+
440
+ # CA2008: Do not create tasks without passing a TaskScheduler
441
+ dotnet_diagnostic.CA2008.severity = error
442
+
443
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
444
+ dotnet_diagnostic.CA2009.severity = error
445
+
446
+ # CA2011: Avoid infinite recursion
447
+ dotnet_diagnostic.CA2011.severity = error
448
+
449
+ # CA2012: Use ValueTasks correctly
450
+ dotnet_diagnostic.CA2012.severity = error
451
+
452
+ # CA2013: Do not use ReferenceEquals with value types
453
+ dotnet_diagnostic.CA2013.severity = error
454
+
455
+ # CA2014: Do not use stackalloc in loops
456
+ dotnet_diagnostic.CA2014.severity = error
457
+
458
+ # CA2015: Do not define finalizers for types derived from MemoryManager<T>
459
+ dotnet_diagnostic.CA2015.severity = error
460
+
461
+ # CA2016: Forward the 'CancellationToken' parameter to methods
462
+ dotnet_diagnostic.CA2016.severity = error
463
+
464
+ # CA2017: Parameter count mismatch
465
+ dotnet_diagnostic.CA2017.severity = none
466
+
467
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
468
+ dotnet_diagnostic.CA2018.severity = none
469
+
470
+ # CA2019: Improper 'ThreadStatic' field initialization
471
+ dotnet_diagnostic.CA2019.severity = none
472
+
473
+ # CA2020: Prevent behavioral change
474
+ dotnet_diagnostic.CA2020.severity = none
475
+
476
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
477
+ dotnet_diagnostic.CA2021.severity = none
478
+
479
+ # CA2022: Avoid inexact read with 'Stream.Read'
480
+ dotnet_diagnostic.CA2022.severity = none
481
+
482
+ # CA2100: Review SQL queries for security vulnerabilities
483
+ dotnet_diagnostic.CA2100.severity = error
484
+
485
+ # CA2101: Specify marshaling for P/Invoke string arguments
486
+ dotnet_diagnostic.CA2101.severity = error
487
+
488
+ # CA2119: Seal methods that satisfy private interfaces
489
+ dotnet_diagnostic.CA2119.severity = error
490
+
491
+ # CA2153: Do Not Catch Corrupted State Exceptions
492
+ dotnet_diagnostic.CA2153.severity = error
493
+
494
+ # CA2200: Rethrow to preserve stack details
495
+ dotnet_diagnostic.CA2200.severity = error
496
+
497
+ # CA2201: Do not raise reserved exception types
498
+ dotnet_diagnostic.CA2201.severity = error
499
+
500
+ # CA2207: Initialize value type static fields inline
501
+ dotnet_diagnostic.CA2207.severity = error
502
+
503
+ # CA2208: Instantiate argument exceptions correctly
504
+ dotnet_diagnostic.CA2208.severity = error
505
+
506
+ # CA2211: Non-constant fields should not be visible
507
+ dotnet_diagnostic.CA2211.severity = error
508
+
509
+ # CA2213: Disposable fields should be disposed
510
+ dotnet_diagnostic.CA2213.severity = error
511
+
512
+ # CA2214: Do not call overridable methods in constructors
513
+ dotnet_diagnostic.CA2214.severity = error
514
+
515
+ # CA2215: Dispose methods should call base class dispose
516
+ dotnet_diagnostic.CA2215.severity = error
517
+
518
+ # CA2216: Disposable types should declare finalizer
519
+ dotnet_diagnostic.CA2216.severity = error
520
+
521
+ # CA2217: Do not mark enums with FlagsAttribute
522
+ dotnet_diagnostic.CA2217.severity = error
523
+
524
+ # CA2218: Override GetHashCode on overriding Equals
525
+ dotnet_diagnostic.CA2218.severity = error
526
+
527
+ # CA2219: Do not raise exceptions in finally clauses
528
+ dotnet_diagnostic.CA2219.severity = error
529
+
530
+ # CA2224: Override Equals on overloading operator equals
531
+ dotnet_diagnostic.CA2224.severity = error
532
+
533
+ # CA2225: Operator overloads have named alternates
534
+ dotnet_diagnostic.CA2225.severity = error
535
+
536
+ # CA2226: Operators should have symmetrical overloads
537
+ dotnet_diagnostic.CA2226.severity = error
538
+
539
+ # CA2227: Collection properties should be read only
540
+ dotnet_diagnostic.CA2227.severity = error
541
+
542
+ # CA2231: Overload operator equals on overriding value type Equals
543
+ dotnet_diagnostic.CA2231.severity = error
544
+
545
+ # CA2234: Pass system uri objects instead of strings
546
+ dotnet_diagnostic.CA2234.severity = error
547
+
548
+ # CA2235: Mark all non-serializable fields
549
+ dotnet_diagnostic.CA2235.severity = error
550
+
551
+ # CA2237: Mark ISerializable types with serializable
552
+ dotnet_diagnostic.CA2237.severity = error
553
+
554
+ # CA2241: Provide correct arguments to formatting methods
555
+ dotnet_diagnostic.CA2241.severity = error
556
+
557
+ # CA2242: Test for NaN correctly
558
+ dotnet_diagnostic.CA2242.severity = error
559
+
560
+ # CA2243: Attribute string literals should parse correctly
561
+ dotnet_diagnostic.CA2243.severity = error
562
+
563
+ # CA2244: Do not duplicate indexed element initializations
564
+ dotnet_diagnostic.CA2244.severity = error
565
+
566
+ # CA2245: Do not assign a property to itself
567
+ dotnet_diagnostic.CA2245.severity = error
568
+
569
+ # CA2246: Assigning symbol and its member in the same statement
570
+ dotnet_diagnostic.CA2246.severity = error
571
+
572
+ # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
573
+ dotnet_diagnostic.CA2247.severity = error
574
+
575
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
576
+ dotnet_diagnostic.CA2248.severity = error
577
+
578
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
579
+ dotnet_diagnostic.CA2249.severity = error
580
+
581
+ # CA2250: Use 'ThrowIfCancellationRequested'
582
+ dotnet_diagnostic.CA2250.severity = none
583
+
584
+ # CA2251: Use 'string.Equals'
585
+ dotnet_diagnostic.CA2251.severity = none
586
+
587
+ # CA2252: This API requires opting into preview features
588
+ dotnet_diagnostic.CA2252.severity = none
589
+
590
+ # CA2253: Named placeholders should not be numeric values
591
+ dotnet_diagnostic.CA2253.severity = none
592
+
593
+ # CA2254: Template should be a static expression
594
+ dotnet_diagnostic.CA2254.severity = none
595
+
596
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
597
+ dotnet_diagnostic.CA2255.severity = none
598
+
599
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
600
+ dotnet_diagnostic.CA2256.severity = none
601
+
602
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
603
+ dotnet_diagnostic.CA2257.severity = none
604
+
605
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
606
+ dotnet_diagnostic.CA2258.severity = none
607
+
608
+ # CA2259: 'ThreadStatic' only affects static fields
609
+ dotnet_diagnostic.CA2259.severity = none
610
+
611
+ # CA2260: Use correct type parameter
612
+ dotnet_diagnostic.CA2260.severity = none
613
+
614
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
615
+ dotnet_diagnostic.CA2261.severity = none
616
+
617
+ # CA2262: Set 'MaxResponseHeadersLength' properly
618
+ dotnet_diagnostic.CA2262.severity = none
619
+
620
+ # CA2263: Prefer generic overload when type is known
621
+ dotnet_diagnostic.CA2263.severity = none
622
+
623
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
624
+ dotnet_diagnostic.CA2264.severity = none
625
+
626
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
627
+ dotnet_diagnostic.CA2265.severity = none
628
+
629
+ # CA2300: Do not use insecure deserializer BinaryFormatter
630
+ dotnet_diagnostic.CA2300.severity = error
631
+
632
+ # CA2301: Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder
633
+ dotnet_diagnostic.CA2301.severity = error
634
+
635
+ # CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize
636
+ dotnet_diagnostic.CA2302.severity = error
637
+
638
+ # CA2305: Do not use insecure deserializer LosFormatter
639
+ dotnet_diagnostic.CA2305.severity = error
640
+
641
+ # CA2310: Do not use insecure deserializer NetDataContractSerializer
642
+ dotnet_diagnostic.CA2310.severity = error
643
+
644
+ # CA2311: Do not deserialize without first setting NetDataContractSerializer.Binder
645
+ dotnet_diagnostic.CA2311.severity = error
646
+
647
+ # CA2312: Ensure NetDataContractSerializer.Binder is set before deserializing
648
+ dotnet_diagnostic.CA2312.severity = error
649
+
650
+ # CA2315: Do not use insecure deserializer ObjectStateFormatter
651
+ dotnet_diagnostic.CA2315.severity = error
652
+
653
+ # CA2321: Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver
654
+ dotnet_diagnostic.CA2321.severity = error
655
+
656
+ # CA2322: Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing
657
+ dotnet_diagnostic.CA2322.severity = error
658
+
659
+ # CA2326: Do not use TypeNameHandling values other than None
660
+ dotnet_diagnostic.CA2326.severity = error
661
+
662
+ # CA2327: Do not use insecure JsonSerializerSettings
663
+ dotnet_diagnostic.CA2327.severity = error
664
+
665
+ # CA2328: Ensure that JsonSerializerSettings are secure
666
+ dotnet_diagnostic.CA2328.severity = error
667
+
668
+ # CA2329: Do not deserialize with JsonSerializer using an insecure configuration
669
+ dotnet_diagnostic.CA2329.severity = error
670
+
671
+ # CA2330: Ensure that JsonSerializer has a secure configuration when deserializing
672
+ dotnet_diagnostic.CA2330.severity = error
673
+
674
+ # CA2350: Do not use DataTable.ReadXml() with untrusted data
675
+ dotnet_diagnostic.CA2350.severity = error
676
+
677
+ # CA2351: Do not use DataSet.ReadXml() with untrusted data
678
+ dotnet_diagnostic.CA2351.severity = error
679
+
680
+ # CA2352: Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks
681
+ dotnet_diagnostic.CA2352.severity = error
682
+
683
+ # CA2353: Unsafe DataSet or DataTable in serializable type
684
+ dotnet_diagnostic.CA2353.severity = error
685
+
686
+ # CA2354: Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks
687
+ dotnet_diagnostic.CA2354.severity = error
688
+
689
+ # CA2355: Unsafe DataSet or DataTable type found in deserializable object graph
690
+ dotnet_diagnostic.CA2355.severity = error
691
+
692
+ # CA2356: Unsafe DataSet or DataTable type in web deserializable object graph
693
+ dotnet_diagnostic.CA2356.severity = error
694
+
695
+ # CA2361: Ensure auto-generated class containing DataSet.ReadXml() is not used with untrusted data
696
+ dotnet_diagnostic.CA2361.severity = error
697
+
698
+ # CA2362: Unsafe DataSet or DataTable in auto-generated serializable type can be vulnerable to remote code execution attacks
699
+ dotnet_diagnostic.CA2362.severity = error
700
+
701
+ # CA3001: Review code for SQL injection vulnerabilities
702
+ dotnet_diagnostic.CA3001.severity = error
703
+
704
+ # CA3002: Review code for XSS vulnerabilities
705
+ dotnet_diagnostic.CA3002.severity = error
706
+
707
+ # CA3003: Review code for file path injection vulnerabilities
708
+ dotnet_diagnostic.CA3003.severity = error
709
+
710
+ # CA3004: Review code for information disclosure vulnerabilities
711
+ dotnet_diagnostic.CA3004.severity = error
712
+
713
+ # CA3005: Review code for LDAP injection vulnerabilities
714
+ dotnet_diagnostic.CA3005.severity = error
715
+
716
+ # CA3006: Review code for process command injection vulnerabilities
717
+ dotnet_diagnostic.CA3006.severity = error
718
+
719
+ # CA3007: Review code for open redirect vulnerabilities
720
+ dotnet_diagnostic.CA3007.severity = error
721
+
722
+ # CA3008: Review code for XPath injection vulnerabilities
723
+ dotnet_diagnostic.CA3008.severity = error
724
+
725
+ # CA3009: Review code for XML injection vulnerabilities
726
+ dotnet_diagnostic.CA3009.severity = error
727
+
728
+ # CA3010: Review code for XAML injection vulnerabilities
729
+ dotnet_diagnostic.CA3010.severity = error
730
+
731
+ # CA3011: Review code for DLL injection vulnerabilities
732
+ dotnet_diagnostic.CA3011.severity = error
733
+
734
+ # CA3012: Review code for regex injection vulnerabilities
735
+ dotnet_diagnostic.CA3012.severity = error
736
+
737
+ # CA3061: Do Not Add Schema By URL
738
+ dotnet_diagnostic.CA3061.severity = error
739
+
740
+ # CA3075: Insecure DTD processing in XML
741
+ dotnet_diagnostic.CA3075.severity = error
742
+
743
+ # CA3076: Insecure XSLT script processing
744
+ dotnet_diagnostic.CA3076.severity = error
745
+
746
+ # CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader
747
+ dotnet_diagnostic.CA3077.severity = error
748
+
749
+ # CA3147: Mark Verb Handlers With Validate Antiforgery Token
750
+ dotnet_diagnostic.CA3147.severity = error
751
+
752
+ # CA5350: Do Not Use Weak Cryptographic Algorithms
753
+ dotnet_diagnostic.CA5350.severity = error
754
+
755
+ # CA5351: Do Not Use Broken Cryptographic Algorithms
756
+ dotnet_diagnostic.CA5351.severity = error
757
+
758
+ # CA5358: Review cipher mode usage with cryptography experts
759
+ dotnet_diagnostic.CA5358.severity = error
760
+
761
+ # CA5359: Do Not Disable Certificate Validation
762
+ dotnet_diagnostic.CA5359.severity = error
763
+
764
+ # CA5360: Do Not Call Dangerous Methods In Deserialization
765
+ dotnet_diagnostic.CA5360.severity = error
766
+
767
+ # CA5361: Do Not Disable SChannel Use of Strong Crypto
768
+ dotnet_diagnostic.CA5361.severity = error
769
+
770
+ # CA5362: Potential reference cycle in deserialized object graph
771
+ dotnet_diagnostic.CA5362.severity = error
772
+
773
+ # CA5363: Do Not Disable Request Validation
774
+ dotnet_diagnostic.CA5363.severity = error
775
+
776
+ # CA5364: Do Not Use Deprecated Security Protocols
777
+ dotnet_diagnostic.CA5364.severity = error
778
+
779
+ # CA5365: Do Not Disable HTTP Header Checking
780
+ dotnet_diagnostic.CA5365.severity = error
781
+
782
+ # CA5366: Use XmlReader for 'DataSet.ReadXml()'
783
+ dotnet_diagnostic.CA5366.severity = error
784
+
785
+ # CA5367: Do Not Serialize Types With Pointer Fields
786
+ dotnet_diagnostic.CA5367.severity = error
787
+
788
+ # CA5368: Set ViewStateUserKey For Classes Derived From Page
789
+ dotnet_diagnostic.CA5368.severity = error
790
+
791
+ # CA5369: Use XmlReader for 'XmlSerializer.Deserialize()'
792
+ dotnet_diagnostic.CA5369.severity = error
793
+
794
+ # CA5370: Use XmlReader for XmlValidatingReader constructor
795
+ dotnet_diagnostic.CA5370.severity = error
796
+
797
+ # CA5371: Use XmlReader for 'XmlSchema.Read()'
798
+ dotnet_diagnostic.CA5371.severity = error
799
+
800
+ # CA5372: Use XmlReader for XPathDocument constructor
801
+ dotnet_diagnostic.CA5372.severity = error
802
+
803
+ # CA5373: Do not use obsolete key derivation function
804
+ dotnet_diagnostic.CA5373.severity = error
805
+
806
+ # CA5374: Do Not Use XslTransform
807
+ dotnet_diagnostic.CA5374.severity = error
808
+
809
+ # CA5375: Do Not Use Account Shared Access Signature
810
+ dotnet_diagnostic.CA5375.severity = error
811
+
812
+ # CA5376: Use SharedAccessProtocol HttpsOnly
813
+ dotnet_diagnostic.CA5376.severity = error
814
+
815
+ # CA5377: Use Container Level Access Policy
816
+ dotnet_diagnostic.CA5377.severity = error
817
+
818
+ # CA5378: Do not disable ServicePointManagerSecurityProtocols
819
+ dotnet_diagnostic.CA5378.severity = error
820
+
821
+ # CA5379: Ensure Key Derivation Function algorithm is sufficiently strong
822
+ dotnet_diagnostic.CA5379.severity = error
823
+
824
+ # CA5380: Do Not Add Certificates To Root Store
825
+ dotnet_diagnostic.CA5380.severity = error
826
+
827
+ # CA5381: Ensure Certificates Are Not Added To Root Store
828
+ dotnet_diagnostic.CA5381.severity = error
829
+
830
+ # CA5382: Use Secure Cookies In ASP.NET Core
831
+ dotnet_diagnostic.CA5382.severity = error
832
+
833
+ # CA5383: Ensure Use Secure Cookies In ASP.NET Core
834
+ dotnet_diagnostic.CA5383.severity = error
835
+
836
+ # CA5384: Do Not Use Digital Signature Algorithm (DSA)
837
+ dotnet_diagnostic.CA5384.severity = error
838
+
839
+ # CA5385: Use Rivest-Shamir-Adleman (RSA) Algorithm With Sufficient Key Size
840
+ dotnet_diagnostic.CA5385.severity = error
841
+
842
+ # CA5386: Avoid hardcoding SecurityProtocolType value
843
+ dotnet_diagnostic.CA5386.severity = error
844
+
845
+ # CA5387: Do Not Use Weak Key Derivation Function With Insufficient Iteration Count
846
+ dotnet_diagnostic.CA5387.severity = error
847
+
848
+ # CA5388: Ensure Sufficient Iteration Count When Using Weak Key Derivation Function
849
+ dotnet_diagnostic.CA5388.severity = error
850
+
851
+ # CA5389: Do Not Add Archive Item's Path To The Target File System Path
852
+ dotnet_diagnostic.CA5389.severity = error
853
+
854
+ # CA5390: Do not hard-code encryption key
855
+ dotnet_diagnostic.CA5390.severity = error
856
+
857
+ # CA5391: Use antiforgery tokens in ASP.NET Core MVC controllers
858
+ dotnet_diagnostic.CA5391.severity = error
859
+
860
+ # CA5392: Use DefaultDllImportSearchPaths attribute for P/Invokes
861
+ dotnet_diagnostic.CA5392.severity = error
862
+
863
+ # CA5393: Do not use unsafe DllImportSearchPath value
864
+ dotnet_diagnostic.CA5393.severity = error
865
+
866
+ # CA5394: Do not use insecure randomness
867
+ dotnet_diagnostic.CA5394.severity = error
868
+
869
+ # CA5395: Miss HttpVerb attribute for action methods
870
+ dotnet_diagnostic.CA5395.severity = error
871
+
872
+ # CA5396: Set HttpOnly to true for HttpCookie
873
+ dotnet_diagnostic.CA5396.severity = error
874
+
875
+ # CA5397: Do not use deprecated SslProtocols values
876
+ dotnet_diagnostic.CA5397.severity = error
877
+
878
+ # CA5398: Avoid hardcoded SslProtocols values
879
+ dotnet_diagnostic.CA5398.severity = error
880
+
881
+ # CA5399: HttpClients should enable certificate revocation list checks
882
+ dotnet_diagnostic.CA5399.severity = error
883
+
884
+ # CA5400: Ensure HttpClient certificate revocation list check is not disabled
885
+ dotnet_diagnostic.CA5400.severity = error
886
+
887
+ # CA5401: Do not use CreateEncryptor with non-default IV
888
+ dotnet_diagnostic.CA5401.severity = error
889
+
890
+ # CA5402: Use CreateEncryptor with the default IV
891
+ dotnet_diagnostic.CA5402.severity = error
892
+
893
+ # CA5403: Do not hard-code certificate
894
+ dotnet_diagnostic.CA5403.severity = error
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_default.globalconfig ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '5.0' release with 'Default' analysis mode
4
+ # Description: Rules with enabled-by-default state from '5.0' release with 'Default' analysis mode. Rules that are first released in a version later than '5.0' are disabled.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1311: Specify a culture or use an invariant version
12
+ dotnet_diagnostic.CA1311.severity = none
13
+
14
+ # CA1418: Use valid platform string
15
+ dotnet_diagnostic.CA1418.severity = none
16
+
17
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
18
+ dotnet_diagnostic.CA1419.severity = none
19
+
20
+ # CA1420: Property, type, or attribute requires runtime marshalling
21
+ dotnet_diagnostic.CA1420.severity = none
22
+
23
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
24
+ dotnet_diagnostic.CA1421.severity = none
25
+
26
+ # CA1422: Validate platform compatibility
27
+ dotnet_diagnostic.CA1422.severity = none
28
+
29
+ # CA1510: Use ArgumentNullException throw helper
30
+ dotnet_diagnostic.CA1510.severity = none
31
+
32
+ # CA1511: Use ArgumentException throw helper
33
+ dotnet_diagnostic.CA1511.severity = none
34
+
35
+ # CA1512: Use ArgumentOutOfRangeException throw helper
36
+ dotnet_diagnostic.CA1512.severity = none
37
+
38
+ # CA1513: Use ObjectDisposedException throw helper
39
+ dotnet_diagnostic.CA1513.severity = none
40
+
41
+ # CA1514: Avoid redundant length argument
42
+ dotnet_diagnostic.CA1514.severity = none
43
+
44
+ # CA1727: Use PascalCase for named placeholders
45
+ dotnet_diagnostic.CA1727.severity = none
46
+
47
+ # CA1839: Use 'Environment.ProcessPath'
48
+ dotnet_diagnostic.CA1839.severity = none
49
+
50
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
51
+ dotnet_diagnostic.CA1840.severity = none
52
+
53
+ # CA1841: Prefer Dictionary.Contains methods
54
+ dotnet_diagnostic.CA1841.severity = none
55
+
56
+ # CA1842: Do not use 'WhenAll' with a single task
57
+ dotnet_diagnostic.CA1842.severity = none
58
+
59
+ # CA1843: Do not use 'WaitAll' with a single task
60
+ dotnet_diagnostic.CA1843.severity = none
61
+
62
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
63
+ dotnet_diagnostic.CA1844.severity = none
64
+
65
+ # CA1845: Use span-based 'string.Concat'
66
+ dotnet_diagnostic.CA1845.severity = none
67
+
68
+ # CA1846: Prefer 'AsSpan' over 'Substring'
69
+ dotnet_diagnostic.CA1846.severity = none
70
+
71
+ # CA1847: Use char literal for a single character lookup
72
+ dotnet_diagnostic.CA1847.severity = none
73
+
74
+ # CA1848: Use the LoggerMessage delegates
75
+ dotnet_diagnostic.CA1848.severity = none
76
+
77
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
78
+ dotnet_diagnostic.CA1850.severity = none
79
+
80
+ # CA1852: Seal internal types
81
+ dotnet_diagnostic.CA1852.severity = none
82
+
83
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
84
+ dotnet_diagnostic.CA1853.severity = none
85
+
86
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
87
+ dotnet_diagnostic.CA1854.severity = none
88
+
89
+ # CA1855: Prefer 'Clear' over 'Fill'
90
+ dotnet_diagnostic.CA1855.severity = none
91
+
92
+ # CA1856: Incorrect usage of ConstantExpected attribute
93
+ dotnet_diagnostic.CA1856.severity = none
94
+
95
+ # CA1857: A constant is expected for the parameter
96
+ dotnet_diagnostic.CA1857.severity = none
97
+
98
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
99
+ dotnet_diagnostic.CA1858.severity = none
100
+
101
+ # CA1859: Use concrete types when possible for improved performance
102
+ dotnet_diagnostic.CA1859.severity = none
103
+
104
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
105
+ dotnet_diagnostic.CA1860.severity = none
106
+
107
+ # CA1861: Avoid constant arrays as arguments
108
+ dotnet_diagnostic.CA1861.severity = none
109
+
110
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
111
+ dotnet_diagnostic.CA1862.severity = none
112
+
113
+ # CA1863: Use 'CompositeFormat'
114
+ dotnet_diagnostic.CA1863.severity = none
115
+
116
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
117
+ dotnet_diagnostic.CA1864.severity = none
118
+
119
+ # CA1865: Use char overload
120
+ dotnet_diagnostic.CA1865.severity = none
121
+
122
+ # CA1866: Use char overload
123
+ dotnet_diagnostic.CA1866.severity = none
124
+
125
+ # CA1868: Unnecessary call to 'Contains(item)'
126
+ dotnet_diagnostic.CA1868.severity = none
127
+
128
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
129
+ dotnet_diagnostic.CA1869.severity = none
130
+
131
+ # CA1870: Use a cached 'SearchValues' instance
132
+ dotnet_diagnostic.CA1870.severity = none
133
+
134
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
135
+ dotnet_diagnostic.CA1871.severity = none
136
+
137
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
138
+ dotnet_diagnostic.CA1872.severity = none
139
+
140
+ # CA2017: Parameter count mismatch
141
+ dotnet_diagnostic.CA2017.severity = none
142
+
143
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
144
+ dotnet_diagnostic.CA2018.severity = none
145
+
146
+ # CA2019: Improper 'ThreadStatic' field initialization
147
+ dotnet_diagnostic.CA2019.severity = none
148
+
149
+ # CA2020: Prevent behavioral change
150
+ dotnet_diagnostic.CA2020.severity = none
151
+
152
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
153
+ dotnet_diagnostic.CA2021.severity = none
154
+
155
+ # CA2022: Avoid inexact read with 'Stream.Read'
156
+ dotnet_diagnostic.CA2022.severity = none
157
+
158
+ # CA2250: Use 'ThrowIfCancellationRequested'
159
+ dotnet_diagnostic.CA2250.severity = none
160
+
161
+ # CA2251: Use 'string.Equals'
162
+ dotnet_diagnostic.CA2251.severity = none
163
+
164
+ # CA2252: This API requires opting into preview features
165
+ dotnet_diagnostic.CA2252.severity = none
166
+
167
+ # CA2253: Named placeholders should not be numeric values
168
+ dotnet_diagnostic.CA2253.severity = none
169
+
170
+ # CA2254: Template should be a static expression
171
+ dotnet_diagnostic.CA2254.severity = none
172
+
173
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
174
+ dotnet_diagnostic.CA2255.severity = none
175
+
176
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
177
+ dotnet_diagnostic.CA2256.severity = none
178
+
179
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
180
+ dotnet_diagnostic.CA2257.severity = none
181
+
182
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
183
+ dotnet_diagnostic.CA2258.severity = none
184
+
185
+ # CA2259: 'ThreadStatic' only affects static fields
186
+ dotnet_diagnostic.CA2259.severity = none
187
+
188
+ # CA2260: Use correct type parameter
189
+ dotnet_diagnostic.CA2260.severity = none
190
+
191
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
192
+ dotnet_diagnostic.CA2261.severity = none
193
+
194
+ # CA2262: Set 'MaxResponseHeadersLength' properly
195
+ dotnet_diagnostic.CA2262.severity = none
196
+
197
+ # CA2263: Prefer generic overload when type is known
198
+ dotnet_diagnostic.CA2263.severity = none
199
+
200
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
201
+ dotnet_diagnostic.CA2264.severity = none
202
+
203
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
204
+ dotnet_diagnostic.CA2265.severity = none
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_default_warnaserror.globalconfig ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '5.0' release with 'Default' analysis mode escalated to 'error' severity
4
+ # Description: Rules with enabled-by-default state from '5.0' release with 'Default' analysis mode. Rules that are first released in a version later than '5.0' are disabled. Enabled rules with 'warning' severity are escalated to 'error' severity to respect 'CodeAnalysisTreatWarningsAsErrors' MSBuild property.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1311: Specify a culture or use an invariant version
12
+ dotnet_diagnostic.CA1311.severity = none
13
+
14
+ # CA1416: Validate platform compatibility
15
+ dotnet_diagnostic.CA1416.severity = error
16
+
17
+ # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes
18
+ dotnet_diagnostic.CA1417.severity = error
19
+
20
+ # CA1418: Use valid platform string
21
+ dotnet_diagnostic.CA1418.severity = none
22
+
23
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
24
+ dotnet_diagnostic.CA1419.severity = none
25
+
26
+ # CA1420: Property, type, or attribute requires runtime marshalling
27
+ dotnet_diagnostic.CA1420.severity = none
28
+
29
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
30
+ dotnet_diagnostic.CA1421.severity = none
31
+
32
+ # CA1422: Validate platform compatibility
33
+ dotnet_diagnostic.CA1422.severity = none
34
+
35
+ # CA1510: Use ArgumentNullException throw helper
36
+ dotnet_diagnostic.CA1510.severity = none
37
+
38
+ # CA1511: Use ArgumentException throw helper
39
+ dotnet_diagnostic.CA1511.severity = none
40
+
41
+ # CA1512: Use ArgumentOutOfRangeException throw helper
42
+ dotnet_diagnostic.CA1512.severity = none
43
+
44
+ # CA1513: Use ObjectDisposedException throw helper
45
+ dotnet_diagnostic.CA1513.severity = none
46
+
47
+ # CA1514: Avoid redundant length argument
48
+ dotnet_diagnostic.CA1514.severity = none
49
+
50
+ # CA1727: Use PascalCase for named placeholders
51
+ dotnet_diagnostic.CA1727.severity = none
52
+
53
+ # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
54
+ dotnet_diagnostic.CA1831.severity = error
55
+
56
+ # CA1839: Use 'Environment.ProcessPath'
57
+ dotnet_diagnostic.CA1839.severity = none
58
+
59
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
60
+ dotnet_diagnostic.CA1840.severity = none
61
+
62
+ # CA1841: Prefer Dictionary.Contains methods
63
+ dotnet_diagnostic.CA1841.severity = none
64
+
65
+ # CA1842: Do not use 'WhenAll' with a single task
66
+ dotnet_diagnostic.CA1842.severity = none
67
+
68
+ # CA1843: Do not use 'WaitAll' with a single task
69
+ dotnet_diagnostic.CA1843.severity = none
70
+
71
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
72
+ dotnet_diagnostic.CA1844.severity = none
73
+
74
+ # CA1845: Use span-based 'string.Concat'
75
+ dotnet_diagnostic.CA1845.severity = none
76
+
77
+ # CA1846: Prefer 'AsSpan' over 'Substring'
78
+ dotnet_diagnostic.CA1846.severity = none
79
+
80
+ # CA1847: Use char literal for a single character lookup
81
+ dotnet_diagnostic.CA1847.severity = none
82
+
83
+ # CA1848: Use the LoggerMessage delegates
84
+ dotnet_diagnostic.CA1848.severity = none
85
+
86
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
87
+ dotnet_diagnostic.CA1850.severity = none
88
+
89
+ # CA1852: Seal internal types
90
+ dotnet_diagnostic.CA1852.severity = none
91
+
92
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
93
+ dotnet_diagnostic.CA1853.severity = none
94
+
95
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
96
+ dotnet_diagnostic.CA1854.severity = none
97
+
98
+ # CA1855: Prefer 'Clear' over 'Fill'
99
+ dotnet_diagnostic.CA1855.severity = none
100
+
101
+ # CA1856: Incorrect usage of ConstantExpected attribute
102
+ dotnet_diagnostic.CA1856.severity = none
103
+
104
+ # CA1857: A constant is expected for the parameter
105
+ dotnet_diagnostic.CA1857.severity = none
106
+
107
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
108
+ dotnet_diagnostic.CA1858.severity = none
109
+
110
+ # CA1859: Use concrete types when possible for improved performance
111
+ dotnet_diagnostic.CA1859.severity = none
112
+
113
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
114
+ dotnet_diagnostic.CA1860.severity = none
115
+
116
+ # CA1861: Avoid constant arrays as arguments
117
+ dotnet_diagnostic.CA1861.severity = none
118
+
119
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
120
+ dotnet_diagnostic.CA1862.severity = none
121
+
122
+ # CA1863: Use 'CompositeFormat'
123
+ dotnet_diagnostic.CA1863.severity = none
124
+
125
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
126
+ dotnet_diagnostic.CA1864.severity = none
127
+
128
+ # CA1865: Use char overload
129
+ dotnet_diagnostic.CA1865.severity = none
130
+
131
+ # CA1866: Use char overload
132
+ dotnet_diagnostic.CA1866.severity = none
133
+
134
+ # CA1868: Unnecessary call to 'Contains(item)'
135
+ dotnet_diagnostic.CA1868.severity = none
136
+
137
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
138
+ dotnet_diagnostic.CA1869.severity = none
139
+
140
+ # CA1870: Use a cached 'SearchValues' instance
141
+ dotnet_diagnostic.CA1870.severity = none
142
+
143
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
144
+ dotnet_diagnostic.CA1871.severity = none
145
+
146
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
147
+ dotnet_diagnostic.CA1872.severity = none
148
+
149
+ # CA2013: Do not use ReferenceEquals with value types
150
+ dotnet_diagnostic.CA2013.severity = error
151
+
152
+ # CA2014: Do not use stackalloc in loops
153
+ dotnet_diagnostic.CA2014.severity = error
154
+
155
+ # CA2015: Do not define finalizers for types derived from MemoryManager<T>
156
+ dotnet_diagnostic.CA2015.severity = error
157
+
158
+ # CA2017: Parameter count mismatch
159
+ dotnet_diagnostic.CA2017.severity = none
160
+
161
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
162
+ dotnet_diagnostic.CA2018.severity = none
163
+
164
+ # CA2019: Improper 'ThreadStatic' field initialization
165
+ dotnet_diagnostic.CA2019.severity = none
166
+
167
+ # CA2020: Prevent behavioral change
168
+ dotnet_diagnostic.CA2020.severity = none
169
+
170
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
171
+ dotnet_diagnostic.CA2021.severity = none
172
+
173
+ # CA2022: Avoid inexact read with 'Stream.Read'
174
+ dotnet_diagnostic.CA2022.severity = none
175
+
176
+ # CA2200: Rethrow to preserve stack details
177
+ dotnet_diagnostic.CA2200.severity = error
178
+
179
+ # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
180
+ dotnet_diagnostic.CA2247.severity = error
181
+
182
+ # CA2250: Use 'ThrowIfCancellationRequested'
183
+ dotnet_diagnostic.CA2250.severity = none
184
+
185
+ # CA2251: Use 'string.Equals'
186
+ dotnet_diagnostic.CA2251.severity = none
187
+
188
+ # CA2252: This API requires opting into preview features
189
+ dotnet_diagnostic.CA2252.severity = none
190
+
191
+ # CA2253: Named placeholders should not be numeric values
192
+ dotnet_diagnostic.CA2253.severity = none
193
+
194
+ # CA2254: Template should be a static expression
195
+ dotnet_diagnostic.CA2254.severity = none
196
+
197
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
198
+ dotnet_diagnostic.CA2255.severity = none
199
+
200
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
201
+ dotnet_diagnostic.CA2256.severity = none
202
+
203
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
204
+ dotnet_diagnostic.CA2257.severity = none
205
+
206
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
207
+ dotnet_diagnostic.CA2258.severity = none
208
+
209
+ # CA2259: 'ThreadStatic' only affects static fields
210
+ dotnet_diagnostic.CA2259.severity = none
211
+
212
+ # CA2260: Use correct type parameter
213
+ dotnet_diagnostic.CA2260.severity = none
214
+
215
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
216
+ dotnet_diagnostic.CA2261.severity = none
217
+
218
+ # CA2262: Set 'MaxResponseHeadersLength' properly
219
+ dotnet_diagnostic.CA2262.severity = none
220
+
221
+ # CA2263: Prefer generic overload when type is known
222
+ dotnet_diagnostic.CA2263.severity = none
223
+
224
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
225
+ dotnet_diagnostic.CA2264.severity = none
226
+
227
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
228
+ dotnet_diagnostic.CA2265.severity = none
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_minimum.globalconfig ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '5.0' release with 'Minimum' analysis mode
4
+ # Description: Rules with enabled-by-default state from '5.0' release with 'Minimum' analysis mode. Rules that are first released in a version later than '5.0' are disabled.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1016: Mark assemblies with assembly version
12
+ dotnet_diagnostic.CA1016.severity = warning
13
+
14
+ # CA1018: Mark attributes with AttributeUsageAttribute
15
+ dotnet_diagnostic.CA1018.severity = warning
16
+
17
+ # CA1041: Provide ObsoleteAttribute message
18
+ dotnet_diagnostic.CA1041.severity = warning
19
+
20
+ # CA1047: Do not declare protected member in sealed type
21
+ dotnet_diagnostic.CA1047.severity = warning
22
+
23
+ # CA1050: Declare types in namespaces
24
+ dotnet_diagnostic.CA1050.severity = warning
25
+
26
+ # CA1061: Do not hide base class methods
27
+ dotnet_diagnostic.CA1061.severity = warning
28
+
29
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
30
+ dotnet_diagnostic.CA1067.severity = warning
31
+
32
+ # CA1068: CancellationToken parameters must come last
33
+ dotnet_diagnostic.CA1068.severity = warning
34
+
35
+ # CA1069: Enums values should not be duplicated
36
+ dotnet_diagnostic.CA1069.severity = warning
37
+
38
+ # CA1070: Do not declare event fields as virtual
39
+ dotnet_diagnostic.CA1070.severity = warning
40
+
41
+ # CA1311: Specify a culture or use an invariant version
42
+ dotnet_diagnostic.CA1311.severity = none
43
+
44
+ # CA1401: P/Invokes should not be visible
45
+ dotnet_diagnostic.CA1401.severity = warning
46
+
47
+ # CA1418: Use valid platform string
48
+ dotnet_diagnostic.CA1418.severity = none
49
+
50
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
51
+ dotnet_diagnostic.CA1419.severity = none
52
+
53
+ # CA1420: Property, type, or attribute requires runtime marshalling
54
+ dotnet_diagnostic.CA1420.severity = none
55
+
56
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
57
+ dotnet_diagnostic.CA1421.severity = none
58
+
59
+ # CA1422: Validate platform compatibility
60
+ dotnet_diagnostic.CA1422.severity = none
61
+
62
+ # CA1507: Use nameof to express symbol names
63
+ dotnet_diagnostic.CA1507.severity = warning
64
+
65
+ # CA1510: Use ArgumentNullException throw helper
66
+ dotnet_diagnostic.CA1510.severity = none
67
+
68
+ # CA1511: Use ArgumentException throw helper
69
+ dotnet_diagnostic.CA1511.severity = none
70
+
71
+ # CA1512: Use ArgumentOutOfRangeException throw helper
72
+ dotnet_diagnostic.CA1512.severity = none
73
+
74
+ # CA1513: Use ObjectDisposedException throw helper
75
+ dotnet_diagnostic.CA1513.severity = none
76
+
77
+ # CA1514: Avoid redundant length argument
78
+ dotnet_diagnostic.CA1514.severity = none
79
+
80
+ # CA1727: Use PascalCase for named placeholders
81
+ dotnet_diagnostic.CA1727.severity = none
82
+
83
+ # CA1806: Do not ignore method results
84
+ dotnet_diagnostic.CA1806.severity = warning
85
+
86
+ # CA1816: Dispose methods should call SuppressFinalize
87
+ dotnet_diagnostic.CA1816.severity = warning
88
+
89
+ # CA1821: Remove empty Finalizers
90
+ dotnet_diagnostic.CA1821.severity = warning
91
+
92
+ # CA1822: Mark members as static
93
+ dotnet_diagnostic.CA1822.severity = warning
94
+
95
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
96
+ dotnet_diagnostic.CA1824.severity = warning
97
+
98
+ # CA1825: Avoid zero-length array allocations
99
+ dotnet_diagnostic.CA1825.severity = warning
100
+
101
+ # CA1826: Do not use Enumerable methods on indexable collections
102
+ dotnet_diagnostic.CA1826.severity = warning
103
+
104
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
105
+ dotnet_diagnostic.CA1827.severity = warning
106
+
107
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
108
+ dotnet_diagnostic.CA1828.severity = warning
109
+
110
+ # CA1829: Use Length/Count property instead of Count() when available
111
+ dotnet_diagnostic.CA1829.severity = warning
112
+
113
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
114
+ dotnet_diagnostic.CA1830.severity = warning
115
+
116
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
117
+ dotnet_diagnostic.CA1832.severity = warning
118
+
119
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
120
+ dotnet_diagnostic.CA1833.severity = warning
121
+
122
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
123
+ dotnet_diagnostic.CA1834.severity = warning
124
+
125
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
126
+ dotnet_diagnostic.CA1835.severity = warning
127
+
128
+ # CA1836: Prefer IsEmpty over Count
129
+ dotnet_diagnostic.CA1836.severity = warning
130
+
131
+ # CA1837: Use 'Environment.ProcessId'
132
+ dotnet_diagnostic.CA1837.severity = warning
133
+
134
+ # CA1839: Use 'Environment.ProcessPath'
135
+ dotnet_diagnostic.CA1839.severity = none
136
+
137
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
138
+ dotnet_diagnostic.CA1840.severity = none
139
+
140
+ # CA1841: Prefer Dictionary.Contains methods
141
+ dotnet_diagnostic.CA1841.severity = none
142
+
143
+ # CA1842: Do not use 'WhenAll' with a single task
144
+ dotnet_diagnostic.CA1842.severity = none
145
+
146
+ # CA1843: Do not use 'WaitAll' with a single task
147
+ dotnet_diagnostic.CA1843.severity = none
148
+
149
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
150
+ dotnet_diagnostic.CA1844.severity = none
151
+
152
+ # CA1845: Use span-based 'string.Concat'
153
+ dotnet_diagnostic.CA1845.severity = none
154
+
155
+ # CA1846: Prefer 'AsSpan' over 'Substring'
156
+ dotnet_diagnostic.CA1846.severity = none
157
+
158
+ # CA1847: Use char literal for a single character lookup
159
+ dotnet_diagnostic.CA1847.severity = none
160
+
161
+ # CA1848: Use the LoggerMessage delegates
162
+ dotnet_diagnostic.CA1848.severity = none
163
+
164
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
165
+ dotnet_diagnostic.CA1850.severity = none
166
+
167
+ # CA1852: Seal internal types
168
+ dotnet_diagnostic.CA1852.severity = none
169
+
170
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
171
+ dotnet_diagnostic.CA1853.severity = none
172
+
173
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
174
+ dotnet_diagnostic.CA1854.severity = none
175
+
176
+ # CA1855: Prefer 'Clear' over 'Fill'
177
+ dotnet_diagnostic.CA1855.severity = none
178
+
179
+ # CA1856: Incorrect usage of ConstantExpected attribute
180
+ dotnet_diagnostic.CA1856.severity = none
181
+
182
+ # CA1857: A constant is expected for the parameter
183
+ dotnet_diagnostic.CA1857.severity = none
184
+
185
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
186
+ dotnet_diagnostic.CA1858.severity = none
187
+
188
+ # CA1859: Use concrete types when possible for improved performance
189
+ dotnet_diagnostic.CA1859.severity = none
190
+
191
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
192
+ dotnet_diagnostic.CA1860.severity = none
193
+
194
+ # CA1861: Avoid constant arrays as arguments
195
+ dotnet_diagnostic.CA1861.severity = none
196
+
197
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
198
+ dotnet_diagnostic.CA1862.severity = none
199
+
200
+ # CA1863: Use 'CompositeFormat'
201
+ dotnet_diagnostic.CA1863.severity = none
202
+
203
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
204
+ dotnet_diagnostic.CA1864.severity = none
205
+
206
+ # CA1865: Use char overload
207
+ dotnet_diagnostic.CA1865.severity = none
208
+
209
+ # CA1866: Use char overload
210
+ dotnet_diagnostic.CA1866.severity = none
211
+
212
+ # CA1868: Unnecessary call to 'Contains(item)'
213
+ dotnet_diagnostic.CA1868.severity = none
214
+
215
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
216
+ dotnet_diagnostic.CA1869.severity = none
217
+
218
+ # CA1870: Use a cached 'SearchValues' instance
219
+ dotnet_diagnostic.CA1870.severity = none
220
+
221
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
222
+ dotnet_diagnostic.CA1871.severity = none
223
+
224
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
225
+ dotnet_diagnostic.CA1872.severity = none
226
+
227
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
228
+ dotnet_diagnostic.CA2009.severity = warning
229
+
230
+ # CA2011: Avoid infinite recursion
231
+ dotnet_diagnostic.CA2011.severity = warning
232
+
233
+ # CA2012: Use ValueTasks correctly
234
+ dotnet_diagnostic.CA2012.severity = warning
235
+
236
+ # CA2016: Forward the 'CancellationToken' parameter to methods
237
+ dotnet_diagnostic.CA2016.severity = warning
238
+
239
+ # CA2017: Parameter count mismatch
240
+ dotnet_diagnostic.CA2017.severity = none
241
+
242
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
243
+ dotnet_diagnostic.CA2018.severity = none
244
+
245
+ # CA2019: Improper 'ThreadStatic' field initialization
246
+ dotnet_diagnostic.CA2019.severity = none
247
+
248
+ # CA2020: Prevent behavioral change
249
+ dotnet_diagnostic.CA2020.severity = none
250
+
251
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
252
+ dotnet_diagnostic.CA2021.severity = none
253
+
254
+ # CA2022: Avoid inexact read with 'Stream.Read'
255
+ dotnet_diagnostic.CA2022.severity = none
256
+
257
+ # CA2101: Specify marshaling for P/Invoke string arguments
258
+ dotnet_diagnostic.CA2101.severity = warning
259
+
260
+ # CA2208: Instantiate argument exceptions correctly
261
+ dotnet_diagnostic.CA2208.severity = warning
262
+
263
+ # CA2211: Non-constant fields should not be visible
264
+ dotnet_diagnostic.CA2211.severity = warning
265
+
266
+ # CA2218: Override GetHashCode on overriding Equals
267
+ dotnet_diagnostic.CA2218.severity = warning
268
+
269
+ # CA2219: Do not raise exceptions in finally clauses
270
+ dotnet_diagnostic.CA2219.severity = warning
271
+
272
+ # CA2224: Override Equals on overloading operator equals
273
+ dotnet_diagnostic.CA2224.severity = warning
274
+
275
+ # CA2231: Overload operator equals on overriding value type Equals
276
+ dotnet_diagnostic.CA2231.severity = warning
277
+
278
+ # CA2241: Provide correct arguments to formatting methods
279
+ dotnet_diagnostic.CA2241.severity = warning
280
+
281
+ # CA2242: Test for NaN correctly
282
+ dotnet_diagnostic.CA2242.severity = warning
283
+
284
+ # CA2244: Do not duplicate indexed element initializations
285
+ dotnet_diagnostic.CA2244.severity = warning
286
+
287
+ # CA2245: Do not assign a property to itself
288
+ dotnet_diagnostic.CA2245.severity = warning
289
+
290
+ # CA2246: Assigning symbol and its member in the same statement
291
+ dotnet_diagnostic.CA2246.severity = warning
292
+
293
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
294
+ dotnet_diagnostic.CA2248.severity = warning
295
+
296
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
297
+ dotnet_diagnostic.CA2249.severity = warning
298
+
299
+ # CA2250: Use 'ThrowIfCancellationRequested'
300
+ dotnet_diagnostic.CA2250.severity = none
301
+
302
+ # CA2251: Use 'string.Equals'
303
+ dotnet_diagnostic.CA2251.severity = none
304
+
305
+ # CA2252: This API requires opting into preview features
306
+ dotnet_diagnostic.CA2252.severity = none
307
+
308
+ # CA2253: Named placeholders should not be numeric values
309
+ dotnet_diagnostic.CA2253.severity = none
310
+
311
+ # CA2254: Template should be a static expression
312
+ dotnet_diagnostic.CA2254.severity = none
313
+
314
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
315
+ dotnet_diagnostic.CA2255.severity = none
316
+
317
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
318
+ dotnet_diagnostic.CA2256.severity = none
319
+
320
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
321
+ dotnet_diagnostic.CA2257.severity = none
322
+
323
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
324
+ dotnet_diagnostic.CA2258.severity = none
325
+
326
+ # CA2259: 'ThreadStatic' only affects static fields
327
+ dotnet_diagnostic.CA2259.severity = none
328
+
329
+ # CA2260: Use correct type parameter
330
+ dotnet_diagnostic.CA2260.severity = none
331
+
332
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
333
+ dotnet_diagnostic.CA2261.severity = none
334
+
335
+ # CA2262: Set 'MaxResponseHeadersLength' properly
336
+ dotnet_diagnostic.CA2262.severity = none
337
+
338
+ # CA2263: Prefer generic overload when type is known
339
+ dotnet_diagnostic.CA2263.severity = none
340
+
341
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
342
+ dotnet_diagnostic.CA2264.severity = none
343
+
344
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
345
+ dotnet_diagnostic.CA2265.severity = none
dotnet/sdk/9.0.313/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_5_minimum_warnaserror.globalconfig ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NOTE: Requires **VS2019 16.7** or later
2
+
3
+ # Rules from '5.0' release with 'Minimum' analysis mode escalated to 'error' severity
4
+ # Description: Rules with enabled-by-default state from '5.0' release with 'Minimum' analysis mode. Rules that are first released in a version later than '5.0' are disabled. Enabled rules with 'warning' severity are escalated to 'error' severity to respect 'CodeAnalysisTreatWarningsAsErrors' MSBuild property.
5
+
6
+ is_global = true
7
+
8
+ global_level = -100
9
+
10
+
11
+ # CA1016: Mark assemblies with assembly version
12
+ dotnet_diagnostic.CA1016.severity = error
13
+
14
+ # CA1018: Mark attributes with AttributeUsageAttribute
15
+ dotnet_diagnostic.CA1018.severity = error
16
+
17
+ # CA1041: Provide ObsoleteAttribute message
18
+ dotnet_diagnostic.CA1041.severity = error
19
+
20
+ # CA1047: Do not declare protected member in sealed type
21
+ dotnet_diagnostic.CA1047.severity = error
22
+
23
+ # CA1050: Declare types in namespaces
24
+ dotnet_diagnostic.CA1050.severity = error
25
+
26
+ # CA1061: Do not hide base class methods
27
+ dotnet_diagnostic.CA1061.severity = error
28
+
29
+ # CA1067: Override Object.Equals(object) when implementing IEquatable<T>
30
+ dotnet_diagnostic.CA1067.severity = error
31
+
32
+ # CA1068: CancellationToken parameters must come last
33
+ dotnet_diagnostic.CA1068.severity = error
34
+
35
+ # CA1069: Enums values should not be duplicated
36
+ dotnet_diagnostic.CA1069.severity = error
37
+
38
+ # CA1070: Do not declare event fields as virtual
39
+ dotnet_diagnostic.CA1070.severity = error
40
+
41
+ # CA1311: Specify a culture or use an invariant version
42
+ dotnet_diagnostic.CA1311.severity = none
43
+
44
+ # CA1401: P/Invokes should not be visible
45
+ dotnet_diagnostic.CA1401.severity = error
46
+
47
+ # CA1416: Validate platform compatibility
48
+ dotnet_diagnostic.CA1416.severity = error
49
+
50
+ # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes
51
+ dotnet_diagnostic.CA1417.severity = error
52
+
53
+ # CA1418: Use valid platform string
54
+ dotnet_diagnostic.CA1418.severity = none
55
+
56
+ # CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
57
+ dotnet_diagnostic.CA1419.severity = none
58
+
59
+ # CA1420: Property, type, or attribute requires runtime marshalling
60
+ dotnet_diagnostic.CA1420.severity = none
61
+
62
+ # CA1421: This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied
63
+ dotnet_diagnostic.CA1421.severity = none
64
+
65
+ # CA1422: Validate platform compatibility
66
+ dotnet_diagnostic.CA1422.severity = none
67
+
68
+ # CA1507: Use nameof to express symbol names
69
+ dotnet_diagnostic.CA1507.severity = error
70
+
71
+ # CA1510: Use ArgumentNullException throw helper
72
+ dotnet_diagnostic.CA1510.severity = none
73
+
74
+ # CA1511: Use ArgumentException throw helper
75
+ dotnet_diagnostic.CA1511.severity = none
76
+
77
+ # CA1512: Use ArgumentOutOfRangeException throw helper
78
+ dotnet_diagnostic.CA1512.severity = none
79
+
80
+ # CA1513: Use ObjectDisposedException throw helper
81
+ dotnet_diagnostic.CA1513.severity = none
82
+
83
+ # CA1514: Avoid redundant length argument
84
+ dotnet_diagnostic.CA1514.severity = none
85
+
86
+ # CA1727: Use PascalCase for named placeholders
87
+ dotnet_diagnostic.CA1727.severity = none
88
+
89
+ # CA1806: Do not ignore method results
90
+ dotnet_diagnostic.CA1806.severity = error
91
+
92
+ # CA1816: Dispose methods should call SuppressFinalize
93
+ dotnet_diagnostic.CA1816.severity = error
94
+
95
+ # CA1821: Remove empty Finalizers
96
+ dotnet_diagnostic.CA1821.severity = error
97
+
98
+ # CA1822: Mark members as static
99
+ dotnet_diagnostic.CA1822.severity = error
100
+
101
+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
102
+ dotnet_diagnostic.CA1824.severity = error
103
+
104
+ # CA1825: Avoid zero-length array allocations
105
+ dotnet_diagnostic.CA1825.severity = error
106
+
107
+ # CA1826: Do not use Enumerable methods on indexable collections
108
+ dotnet_diagnostic.CA1826.severity = error
109
+
110
+ # CA1827: Do not use Count() or LongCount() when Any() can be used
111
+ dotnet_diagnostic.CA1827.severity = error
112
+
113
+ # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
114
+ dotnet_diagnostic.CA1828.severity = error
115
+
116
+ # CA1829: Use Length/Count property instead of Count() when available
117
+ dotnet_diagnostic.CA1829.severity = error
118
+
119
+ # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
120
+ dotnet_diagnostic.CA1830.severity = error
121
+
122
+ # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
123
+ dotnet_diagnostic.CA1831.severity = error
124
+
125
+ # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
126
+ dotnet_diagnostic.CA1832.severity = error
127
+
128
+ # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
129
+ dotnet_diagnostic.CA1833.severity = error
130
+
131
+ # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
132
+ dotnet_diagnostic.CA1834.severity = error
133
+
134
+ # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
135
+ dotnet_diagnostic.CA1835.severity = error
136
+
137
+ # CA1836: Prefer IsEmpty over Count
138
+ dotnet_diagnostic.CA1836.severity = error
139
+
140
+ # CA1837: Use 'Environment.ProcessId'
141
+ dotnet_diagnostic.CA1837.severity = error
142
+
143
+ # CA1839: Use 'Environment.ProcessPath'
144
+ dotnet_diagnostic.CA1839.severity = none
145
+
146
+ # CA1840: Use 'Environment.CurrentManagedThreadId'
147
+ dotnet_diagnostic.CA1840.severity = none
148
+
149
+ # CA1841: Prefer Dictionary.Contains methods
150
+ dotnet_diagnostic.CA1841.severity = none
151
+
152
+ # CA1842: Do not use 'WhenAll' with a single task
153
+ dotnet_diagnostic.CA1842.severity = none
154
+
155
+ # CA1843: Do not use 'WaitAll' with a single task
156
+ dotnet_diagnostic.CA1843.severity = none
157
+
158
+ # CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
159
+ dotnet_diagnostic.CA1844.severity = none
160
+
161
+ # CA1845: Use span-based 'string.Concat'
162
+ dotnet_diagnostic.CA1845.severity = none
163
+
164
+ # CA1846: Prefer 'AsSpan' over 'Substring'
165
+ dotnet_diagnostic.CA1846.severity = none
166
+
167
+ # CA1847: Use char literal for a single character lookup
168
+ dotnet_diagnostic.CA1847.severity = none
169
+
170
+ # CA1848: Use the LoggerMessage delegates
171
+ dotnet_diagnostic.CA1848.severity = none
172
+
173
+ # CA1850: Prefer static 'HashData' method over 'ComputeHash'
174
+ dotnet_diagnostic.CA1850.severity = none
175
+
176
+ # CA1852: Seal internal types
177
+ dotnet_diagnostic.CA1852.severity = none
178
+
179
+ # CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
180
+ dotnet_diagnostic.CA1853.severity = none
181
+
182
+ # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
183
+ dotnet_diagnostic.CA1854.severity = none
184
+
185
+ # CA1855: Prefer 'Clear' over 'Fill'
186
+ dotnet_diagnostic.CA1855.severity = none
187
+
188
+ # CA1856: Incorrect usage of ConstantExpected attribute
189
+ dotnet_diagnostic.CA1856.severity = none
190
+
191
+ # CA1857: A constant is expected for the parameter
192
+ dotnet_diagnostic.CA1857.severity = none
193
+
194
+ # CA1858: Use 'StartsWith' instead of 'IndexOf'
195
+ dotnet_diagnostic.CA1858.severity = none
196
+
197
+ # CA1859: Use concrete types when possible for improved performance
198
+ dotnet_diagnostic.CA1859.severity = none
199
+
200
+ # CA1860: Avoid using 'Enumerable.Any()' extension method
201
+ dotnet_diagnostic.CA1860.severity = none
202
+
203
+ # CA1861: Avoid constant arrays as arguments
204
+ dotnet_diagnostic.CA1861.severity = none
205
+
206
+ # CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
207
+ dotnet_diagnostic.CA1862.severity = none
208
+
209
+ # CA1863: Use 'CompositeFormat'
210
+ dotnet_diagnostic.CA1863.severity = none
211
+
212
+ # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
213
+ dotnet_diagnostic.CA1864.severity = none
214
+
215
+ # CA1865: Use char overload
216
+ dotnet_diagnostic.CA1865.severity = none
217
+
218
+ # CA1866: Use char overload
219
+ dotnet_diagnostic.CA1866.severity = none
220
+
221
+ # CA1868: Unnecessary call to 'Contains(item)'
222
+ dotnet_diagnostic.CA1868.severity = none
223
+
224
+ # CA1869: Cache and reuse 'JsonSerializerOptions' instances
225
+ dotnet_diagnostic.CA1869.severity = none
226
+
227
+ # CA1870: Use a cached 'SearchValues' instance
228
+ dotnet_diagnostic.CA1870.severity = none
229
+
230
+ # CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'
231
+ dotnet_diagnostic.CA1871.severity = none
232
+
233
+ # CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
234
+ dotnet_diagnostic.CA1872.severity = none
235
+
236
+ # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
237
+ dotnet_diagnostic.CA2009.severity = error
238
+
239
+ # CA2011: Avoid infinite recursion
240
+ dotnet_diagnostic.CA2011.severity = error
241
+
242
+ # CA2012: Use ValueTasks correctly
243
+ dotnet_diagnostic.CA2012.severity = error
244
+
245
+ # CA2013: Do not use ReferenceEquals with value types
246
+ dotnet_diagnostic.CA2013.severity = error
247
+
248
+ # CA2014: Do not use stackalloc in loops
249
+ dotnet_diagnostic.CA2014.severity = error
250
+
251
+ # CA2015: Do not define finalizers for types derived from MemoryManager<T>
252
+ dotnet_diagnostic.CA2015.severity = error
253
+
254
+ # CA2016: Forward the 'CancellationToken' parameter to methods
255
+ dotnet_diagnostic.CA2016.severity = error
256
+
257
+ # CA2017: Parameter count mismatch
258
+ dotnet_diagnostic.CA2017.severity = none
259
+
260
+ # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument
261
+ dotnet_diagnostic.CA2018.severity = none
262
+
263
+ # CA2019: Improper 'ThreadStatic' field initialization
264
+ dotnet_diagnostic.CA2019.severity = none
265
+
266
+ # CA2020: Prevent behavioral change
267
+ dotnet_diagnostic.CA2020.severity = none
268
+
269
+ # CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
270
+ dotnet_diagnostic.CA2021.severity = none
271
+
272
+ # CA2022: Avoid inexact read with 'Stream.Read'
273
+ dotnet_diagnostic.CA2022.severity = none
274
+
275
+ # CA2101: Specify marshaling for P/Invoke string arguments
276
+ dotnet_diagnostic.CA2101.severity = error
277
+
278
+ # CA2200: Rethrow to preserve stack details
279
+ dotnet_diagnostic.CA2200.severity = error
280
+
281
+ # CA2208: Instantiate argument exceptions correctly
282
+ dotnet_diagnostic.CA2208.severity = error
283
+
284
+ # CA2211: Non-constant fields should not be visible
285
+ dotnet_diagnostic.CA2211.severity = error
286
+
287
+ # CA2218: Override GetHashCode on overriding Equals
288
+ dotnet_diagnostic.CA2218.severity = error
289
+
290
+ # CA2219: Do not raise exceptions in finally clauses
291
+ dotnet_diagnostic.CA2219.severity = error
292
+
293
+ # CA2224: Override Equals on overloading operator equals
294
+ dotnet_diagnostic.CA2224.severity = error
295
+
296
+ # CA2231: Overload operator equals on overriding value type Equals
297
+ dotnet_diagnostic.CA2231.severity = error
298
+
299
+ # CA2241: Provide correct arguments to formatting methods
300
+ dotnet_diagnostic.CA2241.severity = error
301
+
302
+ # CA2242: Test for NaN correctly
303
+ dotnet_diagnostic.CA2242.severity = error
304
+
305
+ # CA2244: Do not duplicate indexed element initializations
306
+ dotnet_diagnostic.CA2244.severity = error
307
+
308
+ # CA2245: Do not assign a property to itself
309
+ dotnet_diagnostic.CA2245.severity = error
310
+
311
+ # CA2246: Assigning symbol and its member in the same statement
312
+ dotnet_diagnostic.CA2246.severity = error
313
+
314
+ # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
315
+ dotnet_diagnostic.CA2247.severity = error
316
+
317
+ # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag'
318
+ dotnet_diagnostic.CA2248.severity = error
319
+
320
+ # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
321
+ dotnet_diagnostic.CA2249.severity = error
322
+
323
+ # CA2250: Use 'ThrowIfCancellationRequested'
324
+ dotnet_diagnostic.CA2250.severity = none
325
+
326
+ # CA2251: Use 'string.Equals'
327
+ dotnet_diagnostic.CA2251.severity = none
328
+
329
+ # CA2252: This API requires opting into preview features
330
+ dotnet_diagnostic.CA2252.severity = none
331
+
332
+ # CA2253: Named placeholders should not be numeric values
333
+ dotnet_diagnostic.CA2253.severity = none
334
+
335
+ # CA2254: Template should be a static expression
336
+ dotnet_diagnostic.CA2254.severity = none
337
+
338
+ # CA2255: The 'ModuleInitializer' attribute should not be used in libraries
339
+ dotnet_diagnostic.CA2255.severity = none
340
+
341
+ # CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
342
+ dotnet_diagnostic.CA2256.severity = none
343
+
344
+ # CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
345
+ dotnet_diagnostic.CA2257.severity = none
346
+
347
+ # CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
348
+ dotnet_diagnostic.CA2258.severity = none
349
+
350
+ # CA2259: 'ThreadStatic' only affects static fields
351
+ dotnet_diagnostic.CA2259.severity = none
352
+
353
+ # CA2260: Use correct type parameter
354
+ dotnet_diagnostic.CA2260.severity = none
355
+
356
+ # CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
357
+ dotnet_diagnostic.CA2261.severity = none
358
+
359
+ # CA2262: Set 'MaxResponseHeadersLength' properly
360
+ dotnet_diagnostic.CA2262.severity = none
361
+
362
+ # CA2263: Prefer generic overload when type is known
363
+ dotnet_diagnostic.CA2263.severity = none
364
+
365
+ # CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'
366
+ dotnet_diagnostic.CA2264.severity = none
367
+
368
+ # CA2265: Do not compare Span<T> to 'null' or 'default'
369
+ dotnet_diagnostic.CA2265.severity = none