Add CA 2021 into CodeAnalysis config (#82649)
authorBuyaa Namnan <bunamnan@microsoft.com>
Sat, 25 Feb 2023 01:25:26 +0000 (17:25 -0800)
committerGitHub <noreply@github.com>
Sat, 25 Feb 2023 01:25:26 +0000 (17:25 -0800)
eng/CodeAnalysis.src.globalconfig
eng/CodeAnalysis.test.globalconfig

index cf423716a4f28e20790f873075ff620141b9ad8f..be4caadbb0dc928eaa034b938b940ee36a1007d4 100644 (file)
@@ -516,6 +516,9 @@ dotnet_diagnostic.CA2019.severity = warning
 # CA2020: Prevent behavioral changes
 dotnet_diagnostic.CA2020.severity = warning
 
+# CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
+dotnet_diagnostic.CA2021.severity = warning
+
 # CA2100: Review SQL queries for security vulnerabilities
 dotnet_diagnostic.CA2100.severity = none
 
index 15601fcd9f104d0836f84de033d2442d50add7d5..b64207eeaf669e8f3a1c549a0f0a324b4fe05dfc 100644 (file)
@@ -513,6 +513,9 @@ dotnet_diagnostic.CA2019.severity = none
 # CA2020: Prevent behavioral changes
 dotnet_diagnostic.CA2020.severity = none
 
+# CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
+dotnet_diagnostic.CA2021.severity = none
+
 # CA2100: Review SQL queries for security vulnerabilities
 dotnet_diagnostic.CA2100.severity = none