Skip to content

Commit 78d9aa3

Browse files
committed
Clarify unreachable code location
1 parent 513b215 commit 78d9aa3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

StyleCop.Analyzers/StyleCop.Analyzers/Helpers/DiagnosticOptionsHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace StyleCop.Analyzers.Helpers
88
{
9+
using System;
910
using System.Collections.Immutable;
1011
using Microsoft.CodeAnalysis;
1112
using Microsoft.CodeAnalysis.Diagnostics;
@@ -61,7 +62,7 @@ internal static bool IsAnalyzerSuppressed(this CompilationOptions compilationOpt
6162
case ReportDiagnostic.Suppress:
6263
return true;
6364
case ReportDiagnostic.Default:
64-
return !descriptor.IsEnabledByDefault;
65+
throw new InvalidOperationException("This should be unreachable.");
6566
default:
6667
return false;
6768
}

0 commit comments

Comments
 (0)