mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 21:38:16 +08:00
Adds documentation for analyzers
This commit is contained in:

committed by
Patrik Svensson

parent
a186fd94ac
commit
fa553fd72e
@ -19,9 +19,17 @@ namespace Spectre.Console.Analyzer
|
||||
|
||||
private static DiagnosticDescriptor Rule(string id, string title, Category category, DiagnosticSeverity defaultSeverity, string messageFormat, string? description = null)
|
||||
{
|
||||
var helpLink = $"https://spectreconsole.net/spectre.console.analyzers/rules/{id}";
|
||||
var helpLink = $"https://spectreconsole.net/analyzer/rules/{id.ToLowerInvariant()}";
|
||||
const bool IsEnabledByDefault = true;
|
||||
return new DiagnosticDescriptor(id, title, messageFormat, _categoryMapping.GetOrAdd(category, c => c.ToString()), defaultSeverity, IsEnabledByDefault, description, helpLink);
|
||||
return new DiagnosticDescriptor(
|
||||
id,
|
||||
title,
|
||||
messageFormat,
|
||||
_categoryMapping.GetOrAdd(category, c => c.ToString()),
|
||||
defaultSeverity,
|
||||
IsEnabledByDefault,
|
||||
description,
|
||||
helpLink);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user