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

@@ -9,16 +9,14 @@ using Microsoft.CodeAnalysis.Diagnostics;
namespace CliFx.Analyzers;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ParameterMustHaveUniqueNameAnalyzer : AnalyzerBase
public class ParameterMustHaveUniqueNameAnalyzer()
: AnalyzerBase(
"Parameters must have unique names",
"This parameter's name must be unique within the command (comparison IS NOT case sensitive). "
+ "Specified name: `{0}`. "
+ "Property bound to another parameter with the same name: `{1}`."
)
{
public ParameterMustHaveUniqueNameAnalyzer()
: base(
"Parameters must have unique names",
"This parameter's name must be unique within the command (comparison IS NOT case sensitive). "
+ "Specified name: `{0}`. "
+ "Property bound to another parameter with the same name: `{1}`."
) { }
private void Analyze(
SyntaxNodeAnalysisContext context,
PropertyDeclarationSyntax propertyDeclaration,