Use CSharpier

This commit is contained in:
Tyrrrz
2023-08-22 21:20:04 +03:00
parent a4726fcefd
commit 21b601da66
99 changed files with 975 additions and 1163 deletions

View File

@@ -13,16 +13,16 @@ public class OptionMustHaveUniqueShortNameAnalyzer : AnalyzerBase
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}`.")
{
}
"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,
IPropertySymbol property)
IPropertySymbol property
)
{
if (property.ContainingType is null)
return;
@@ -34,8 +34,7 @@ public class OptionMustHaveUniqueShortNameAnalyzer : AnalyzerBase
if (option.ShortName is null)
return;
var otherProperties = property
.ContainingType
var otherProperties = property.ContainingType
.GetMembers()
.OfType<IPropertySymbol>()
.Where(m => !m.Equals(property))
@@ -68,4 +67,4 @@ public class OptionMustHaveUniqueShortNameAnalyzer : AnalyzerBase
base.Initialize(context);
context.HandlePropertyDeclaration(Analyze);
}
}
}