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
Diagnostic ID: RS1008: Avoid storing per-compilation data into the fields of a diagnostic analyzer
Analyzer source
Microsoft.CodeAnalysis.CSharp.Analyzers 3.3.4
Describe the bug
The above diagnostic is not reported on field instances of type ISymbol, but it is correctly reported on other relevant types like IMethodSymbol, INamedTypeSymbol, Compilation, etc.
Fields of type IOperation are also not reported.
It seems that the analyzer only checks if the field type implements IOperation or ISymbol, but not if it is an exact match.
Analyzer
Diagnostic ID: RS1008:
Avoid storing per-compilation data into the fields of a diagnostic analyzer
Analyzer source
Microsoft.CodeAnalysis.CSharp.Analyzers 3.3.4
Describe the bug
The above diagnostic is not reported on field instances of type
ISymbol
, but it is correctly reported on other relevant types likeIMethodSymbol
,INamedTypeSymbol
,Compilation
, etc.Example Code
Consider the following analyzer:
Expected behavior
A warning should be reported on the type of the field
_symbol
, like it would if the field's type wasIMethodSymbol
,INamedTypeSymbol
, etc.Actual behavior
The warning is not present.
The text was updated successfully, but these errors were encountered: