Skip to content

Commit c205950

Browse files
committed
Fix code fix status for omitted Fix All
1 parent 0cd33e1 commit c205950

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

StyleCop.Analyzers/StyleCop.Analyzers.Status.Generator/SolutionReader.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,18 +314,17 @@ private IEnumerable<DiagnosticDescriptor> GetDescriptor(INamedTypeSymbol classSy
314314
var codeFixes = this.CodeFixProviders
315315
.Where(x => x.FixableDiagnosticIds.Contains(diagnosticId))
316316
.Select(x => this.IsBatchFixer(x))
317-
.Where(x => x != null)
318-
.Select(x => (bool)x).ToArray();
317+
.ToArray();
319318

320319
hasCodeFix = codeFixes.Length > 0;
321320

322321
codeFixStatus = hasCodeFix ? CodeFixStatus.Implemented : CodeFixStatus.NotYetImplemented;
323322

324-
if (codeFixes.Any(x => x))
323+
if (codeFixes.Any(x => x ?? false))
325324
{
326325
fixAllStatus = FixAllStatus.BatchFixer;
327326
}
328-
else if (codeFixes.Length > 0)
327+
else if (codeFixes.Any(x => x != null))
329328
{
330329
fixAllStatus = FixAllStatus.CustomImplementation;
331330
}

0 commit comments

Comments
 (0)