You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@andrewgaze not managed to resolve this unfortunately - I tried the suggested fix, but that gave no warning at all. There might need to be another config step to get the Location.None to work.
If the project you are in does not have nullable reference types enabled, then ACL1010 highlights every line in every file:
Pretty sure this is because the location of the diagnostic is being set to the root of the syntax tree, i.e. the whole file
Audacia.CodeAnalysis/dotnet-roslyn/analyzers/Audacia.CodeAnalysis.Analyzers/src/Audacia.CodeAnalysis.Analyzers/Rules/NullableReferenceTypes/NullableReferenceTypesAnalyzer.cs
Lines 71 to 76 in 18b5bb4
Instead, I think the location can be set a
Location.None
to indicate the whole file has an issue.For example, this is how AV2210 is reported - only once in the whole file:
And here is how the diagnostic for it is created:
https://github.com/bkoelman/CSharpGuidelinesAnalyzer/blob/e84590e1b0c0682a9a932d6fdd3f4ac1637cd730/src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer/Rules/Framework/BuildWithTheHighestWarningLevelAnalyzer.cs#L46
The text was updated successfully, but these errors were encountered: