Skip to content

Commit

Permalink
revert 87457b2 Lower the severity until bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
James May committed Feb 23, 2023
1 parent 4fb7d1d commit 38bf4b4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/NetAnalyzers/Core/AnalyzerReleases.Unshipped.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CA1857 | Performance | Warning | ConstantExpectedAnalyzer, [Documentation](https
CA1858 | Performance | Info | UseStartsWithInsteadOfIndexOfComparisonWithZero, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1858)
CA1859 | Performance | Info | UseConcreteTypeAnalyzer, [Documentation](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)
CA1860 | Performance | Info | PreferLengthCountIsEmptyOverAnyAnalyzer, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1860)
CA2021 | Reliability | Info | DoNotCallEnumerableCastOrOfTypeWithIncompatibleTypesAnalyzer, [Documentation](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2021)
CA2021 | Reliability | Warning | DoNotCallEnumerableCastOrOfTypeWithIncompatibleTypesAnalyzer, [Documentation](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2021)

### Removed Rules

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed class DoNotCallEnumerableCastOrOfTypeWithIncompatibleTypesAnalyzer
s_localizableTitle,
s_localizableCastMessage,
DiagnosticCategory.Reliability,
RuleLevel.IdeSuggestion,
RuleLevel.BuildWarning,
s_localizableDescription,
isPortedFxCopRule: false,
isDataflowRule: false);
Expand All @@ -39,7 +39,7 @@ public sealed class DoNotCallEnumerableCastOrOfTypeWithIncompatibleTypesAnalyzer
s_localizableTitle,
s_localizableOfTypeMessage,
DiagnosticCategory.Reliability,
RuleLevel.IdeSuggestion,
RuleLevel.BuildWarning,
s_localizableDescription,
isPortedFxCopRule: false,
isDataflowRule: false);
Expand Down
2 changes: 1 addition & 1 deletion src/NetAnalyzers/Microsoft.CodeAnalysis.NetAnalyzers.md
Original file line number Diff line number Diff line change
Expand Up @@ -1886,7 +1886,7 @@ Widening and user defined conversions are not supported with generic types.
|-|-|
|Category|Reliability|
|Enabled|True|
|Severity|Info|
|Severity|Warning|
|CodeFix|False|
---

Expand Down
2 changes: 1 addition & 1 deletion src/NetAnalyzers/Microsoft.CodeAnalysis.NetAnalyzers.sarif
Original file line number Diff line number Diff line change
Expand Up @@ -3382,7 +3382,7 @@
"id": "CA2021",
"shortDescription": "Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types",
"fullDescription": "Enumerable.Cast<T> and Enumerable.OfType<T> require compatible types to function expectedly. \u000aThe generic cast (IL 'unbox.any') used by the sequence returned by Enumerable.Cast<T> will throw InvalidCastException at runtime on elements of the types specified. \u000aThe generic type check (C# 'is' operator/IL 'isinst') used by Enumerable.OfType<T> will never succeed with elements of types specified, resulting in an empty sequence. \u000aWidening and user defined conversions are not supported with generic types.",
"defaultLevel": "note",
"defaultLevel": "warning",
"helpUri": "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2021",
"properties": {
"category": "Reliability",
Expand Down

0 comments on commit 38bf4b4

Please sign in to comment.