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,16 +8,14 @@ using Microsoft.CodeAnalysis.Diagnostics;
|
||||
namespace CliFx.Analyzers;
|
||||
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
public class OptionMustHaveUniqueShortNameAnalyzer : AnalyzerBase
|
||||
public class OptionMustHaveUniqueShortNameAnalyzer()
|
||||
: AnalyzerBase(
|
||||
"Options must have unique short names",
|
||||
"This option's short name must be unique within the command (comparison IS case sensitive). "
|
||||
+ "Specified short name: `{0}` "
|
||||
+ "Property bound to another option with the same short name: `{1}`."
|
||||
)
|
||||
{
|
||||
public OptionMustHaveUniqueShortNameAnalyzer()
|
||||
: base(
|
||||
"Options must have unique short names",
|
||||
"This option's short name must be unique within the command (comparison IS case sensitive). "
|
||||
+ "Specified short name: `{0}` "
|
||||
+ "Property bound to another option with the same short name: `{1}`."
|
||||
) { }
|
||||
|
||||
private void Analyze(
|
||||
SyntaxNodeAnalysisContext context,
|
||||
PropertyDeclarationSyntax propertyDeclaration,
|
||||
|
||||
Reference in New Issue
Block a user