diff --git a/DocumentationAnalyzers/DocumentationAnalyzers.Status.Generator/DocumentationDiagnostic.cs b/DocumentationAnalyzers/DocumentationAnalyzers.Status.Generator/DocumentationDiagnostic.cs index a614290..9f0fb2b 100644 --- a/DocumentationAnalyzers/DocumentationAnalyzers.Status.Generator/DocumentationDiagnostic.cs +++ b/DocumentationAnalyzers/DocumentationAnalyzers.Status.Generator/DocumentationDiagnostic.cs @@ -28,12 +28,12 @@ public class DocumentationDiagnostic public string Name { get; set; } /// - /// Gets or sets a value indicating whether the diagnostic is implemented. + /// Gets or sets the default diagnostic severity. /// /// - /// if the diagnostic is implemented; otherwise . + /// The default diagnostic severity. /// - public bool HasImplementation { get; set; } + public string Severity { get; set; } /// /// Gets or sets a value indicating whether the diagnostic is enabled. This can indicate if the diff --git a/DocumentationAnalyzers/DocumentationAnalyzers.Status.Generator/SolutionReader.cs b/DocumentationAnalyzers/DocumentationAnalyzers.Status.Generator/SolutionReader.cs index ea23c02..c4fab2e 100644 --- a/DocumentationAnalyzers/DocumentationAnalyzers.Status.Generator/SolutionReader.cs +++ b/DocumentationAnalyzers/DocumentationAnalyzers.Status.Generator/SolutionReader.cs @@ -123,8 +123,6 @@ public async Task> GetDiagnosticsAsync() continue; } - bool hasImplementation = HasImplementation(syntaxRoot); - IEnumerable descriptorInfos = GetDescriptor(classSymbol); foreach (var descriptorInfo in descriptorInfos) @@ -140,7 +138,7 @@ public async Task> GetDiagnosticsAsync() { Id = descriptorInfo.Id, Category = descriptorInfo.Category, - HasImplementation = hasImplementation, + Severity = descriptorInfo.DefaultSeverity.ToString(), Status = status, Name = shortName, Title = descriptorInfo.Title.ToString(), @@ -156,23 +154,6 @@ public async Task> GetDiagnosticsAsync() return diagnostics.ToImmutable(); } - private static bool HasImplementation(SyntaxNode syntaxRoot) - { - bool hasImplementation = true; - foreach (var trivia in syntaxRoot.DescendantTrivia()) - { - if (trivia.IsKind(SyntaxKind.SingleLineCommentTrivia)) - { - if (trivia.ToFullString().Contains("TODO: Implement analysis")) - { - hasImplementation = false; - } - } - } - - return hasImplementation; - } - private async Task InitializeAsync() { _solution = await _workspace.OpenSolutionAsync(SlnPath).ConfigureAwait(false); diff --git a/docs/index.html b/docs/index.html index 11f76f0..1e5a683 100644 --- a/docs/index.html +++ b/docs/index.html @@ -70,7 +70,7 @@

This page is reporting the current status of