mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Refactor with C# 12 features
This commit is contained in:
@@ -8,14 +8,12 @@ using Microsoft.CodeAnalysis.Diagnostics;
|
||||
namespace CliFx.Analyzers;
|
||||
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
public class OptionMustBeInsideCommandAnalyzer : AnalyzerBase
|
||||
public class OptionMustBeInsideCommandAnalyzer()
|
||||
: AnalyzerBase(
|
||||
"Options must be defined inside commands",
|
||||
$"This option must be defined inside a class that implements `{SymbolNames.CliFxCommandInterface}`."
|
||||
)
|
||||
{
|
||||
public OptionMustBeInsideCommandAnalyzer()
|
||||
: base(
|
||||
"Options must be defined inside commands",
|
||||
$"This option must be defined inside a class that implements `{SymbolNames.CliFxCommandInterface}`."
|
||||
) { }
|
||||
|
||||
private void Analyze(
|
||||
SyntaxNodeAnalysisContext context,
|
||||
PropertyDeclarationSyntax propertyDeclaration,
|
||||
|
||||
Reference in New Issue
Block a user