Add CA 2021 into CodeAnalysis config#82649
Conversation
|
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsCA2021: Because it is Because the bug could cause a failure in other repos we lowered the severity of the analyzer until those bugs get fixed. Now the fix is ready for merge which also upgrades the severity into runtime/src/libraries/System.Linq/tests/OfTypeTests.cs Lines 42 to 43 in 319fcd9
|
|
The only failure is unrelated and known |
CA2021:
Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible typesis a new analyzer that added in January.Because it is
Warnsby default it caused build failure on automation PR that updates analyzer feed which caused by some edge case scenario bug.Because the bug could cause a failure in other repos we lowered the severity of the analyzer until those bugs get fixed. Now the fix is ready for merge which also upgrades the severity into
Warningback, we need to turn off the analyzer on test projects before merge because it would cause a warning for valid scenarios like:runtime/src/libraries/System.Linq/tests/CastTests.cs
Line 31 in 319fcd9
runtime/src/libraries/System.Linq/tests/OfTypeTests.cs
Lines 42 to 43 in 319fcd9