Improve analyzer diagnostics

This commit is contained in:
Oleksii Holub
2022-04-17 00:01:34 +00:00
committed by GitHub
parent 41cb8647b5
commit ed3e4f471e
21 changed files with 92 additions and 28 deletions

View File

@@ -41,7 +41,9 @@ public class CommandMustBeAnnotatedAnalyzer : AnalyzerBase
// then it's very likely a user error.
if (implementsCommandInterface && !hasCommandAttribute)
{
context.ReportDiagnostic(CreateDiagnostic(classDeclaration.GetLocation()));
context.ReportDiagnostic(
CreateDiagnostic(classDeclaration.Identifier.GetLocation())
);
}
}