@@ -33,7 +33,6 @@ public partial class CheckedExceptionsAnalyzer : DiagnosticAnalyzer
3333 public const string DiagnosticIdXmlDocButNoThrows = "THROW011" ;
3434 public const string DiagnosticIdRedundantExceptionDeclaration = "THROW012" ;
3535 public const string DiagnosticIdRedundantCatchAllClause = "THROW013" ;
36- public const string DiagnosticIdUnreachableThrow = "THROW014" ;
3736 public const string DiagnosticIdRuleUnreachableCode = "THROW020" ;
3837
3938 public static IEnumerable < string > AllDiagnosticsIds = [ DiagnosticIdUnhandled , DiagnosticIdGeneralThrows , DiagnosticIdGeneralThrow , DiagnosticIdDuplicateDeclarations , DiagnosticIdRuleUnreachableCode ] ;
@@ -159,15 +158,6 @@ public partial class CheckedExceptionsAnalyzer : DiagnosticAnalyzer
159158 isEnabledByDefault : true ,
160159 description : "Detects exception types declared with [Throws] that are never thrown in the method or property body, making the declaration redundant." ) ;
161160
162- private static readonly DiagnosticDescriptor RuleUnreachableThrow = new (
163- DiagnosticIdUnreachableThrow ,
164- title : "Unreachable throw statement" ,
165- messageFormat : "The throwing site is unreachable in the current control flow" ,
166- category : "Usage" ,
167- defaultSeverity : DiagnosticSeverity . Warning ,
168- isEnabledByDefault : true ,
169- description : "Detects throw statements that cannot be reached due to surrounding control flow or exception handling." ) ;
170-
171161 private static readonly DiagnosticDescriptor RuleUnreachableCode = new (
172162 DiagnosticIdRuleUnreachableCode ,
173163 title : "Unreachable code" ,
@@ -179,7 +169,7 @@ public partial class CheckedExceptionsAnalyzer : DiagnosticAnalyzer
179169 customTags : [ WellKnownDiagnosticTags . Unnecessary ] ) ;
180170
181171 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics =>
182- [ RuleUnhandledException , RuleIgnoredException , RuleGeneralThrows , RuleGeneralThrow , RuleDuplicateDeclarations , RuleMissingThrowsOnBaseMember , RuleMissingThrowsFromBaseMember , RuleDuplicateThrowsByHierarchy , RuleRedundantTypedCatchClause , RuleRedundantCatchAllClause , RuleThrowsDeclarationNotValidOnFullProperty , RuleXmlDocButNoThrows , RuleRedundantExceptionDeclaration , RuleUnreachableThrow , RuleUnreachableCode ] ;
172+ [ RuleUnhandledException , RuleIgnoredException , RuleGeneralThrows , RuleGeneralThrow , RuleDuplicateDeclarations , RuleMissingThrowsOnBaseMember , RuleMissingThrowsFromBaseMember , RuleDuplicateThrowsByHierarchy , RuleRedundantTypedCatchClause , RuleRedundantCatchAllClause , RuleThrowsDeclarationNotValidOnFullProperty , RuleXmlDocButNoThrows , RuleRedundantExceptionDeclaration , RuleUnreachableCode ] ;
183173
184174 public override void Initialize ( AnalysisContext context )
185175 {
0 commit comments