-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SonarReportingContext: Add ReportIssue with SecondaryLocation #9298
Conversation
e200222
to
4c0c436
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some nitpicks. Overall looks good.
analyzers/src/SonarAnalyzer.Common/AnalysisContext/SonarReportingContextBase.cs
Outdated
Show resolved
Hide resolved
analyzers/src/SonarAnalyzer.Common/AnalysisContext/SonarReportingContextBase.cs
Outdated
Show resolved
Hide resolved
analyzers/src/SonarAnalyzer.Common/Extensions/CompilationExtensions.cs
Outdated
Show resolved
Hide resolved
analyzers/src/SonarAnalyzer.Common/Helpers/SyntaxNodeExtensions.cs
Outdated
Show resolved
Hide resolved
f5edbf6
to
4bf10b9
Compare
Quality Gate passed for 'Sonar .NET Java Plugin'Issues Measures |
Quality Gate passed for 'SonarAnalyzer for .NET'Issues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Prerequisite for #9174
Review per commit shows the logical changes.
The purpose of this PR is to prepare everything that will be needed by all other rules. Migration of other rules (mainly monotounus removals of
DiagnosticDescriptorExtensions.CreateDiagnostic
will be in upcoming PRs)The goals are:
ReportIssue
contract clear aboutSecondaryLocation
boundaryToProperties
does not respectSecondaryLocation.Message
, but uses additional argument insteadI've changed
params object[]
toparams string[]
so we don't risk accidentally sending a collection of secondary locations (with a wrong type) to the params value.