Refactor with C# 12 features

This commit is contained in:
Tyrrrz
2023-12-10 22:51:57 +02:00
parent 5854f36756
commit 490398f773
68 changed files with 371 additions and 622 deletions

View File

@@ -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,