Skip to content

Commit

Permalink
Merge pull request DotNetAnalyzers#72 from sharwell/status-updates
Browse files Browse the repository at this point in the history
Status page updates
  • Loading branch information
sharwell authored Oct 8, 2018
2 parents dba0f90 + 9bb9429 commit cf433d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,18 +293,17 @@ private IEnumerable<DiagnosticDescriptor> GetDescriptor(INamedTypeSymbol classSy
var codeFixes = CodeFixProviders
.Where(x => x.FixableDiagnosticIds.Contains(diagnosticId))
.Select(x => IsBatchFixer(x))
.Where(x => x != null)
.Select(x => (bool)x).ToArray();
.ToArray();

hasCodeFix = codeFixes.Length > 0;

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

if (codeFixes.Any(x => x))
if (codeFixes.Any(x => x ?? false))
{
fixAllStatus = FixAllStatus.BatchFixer;
}
else if (codeFixes.Length > 0)
else if (codeFixes.Any(x => x != null))
{
fixAllStatus = FixAllStatus.CustomImplementation;
}
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ <h2>This page is reporting the current status of <a href="https://github.com/Dot
<td style="overflow: visible; width: 0;">
{{if CodeFixStatus === "Implemented"}}
<i class="fa fa-check" style="color: green;"></i>
{{else CodeFixStatus === NotImplemented}}
<i class="fa fa-times" style="color: red;"></i>
{{else CodeFixStatus === "NotImplemented"}}
<i class="fa fa-times" style="color: red;" title="{{>NoCodeFixReason}}"></i>
{{else}}
<i class="fa fa-exclamation" style="color: blue;"></i>
{{/if}}
Expand Down

0 comments on commit cf433d1

Please sign in to comment.