RS2008 false-negative with target-typed 'new' expression #6393
Labels
Area-Microsoft.CodeAnalysis.Analyzers
False_Negative
No diagnostic is reported for a problematic case
Need More Info
Resolution-Fixed
Analyzer
Diagnostic ID: RS2008:
Enable analyzer release tracking
Analyzer source
NuGet Package: Microsoft.CodeAnalysis.Analyzers
Version: 3.3.3 (transitive dependency of Microsoft.CodeAnalysis.CSharp Version 4.4.0 )
Describe the bug
The DiagnosticDescriptionCreationAnalyzer does not report RS2008 if a target-typed 'new' expression is used to instantiate the
DiagnosticDescriptor
.Steps to Reproduce
Expected behavior
The analyzer should report RS2008 when the
DiagnosticDescriptor
is instantiated using a target-typed expression.Actual behavior
The analyzer does not report the diagnostic.
Note
This issue only seems to occur when the analyzer is run by Visual Studio. Updating the tests ReleaseTrackingAnalyzerTests to use a target-typed 'new' expression doesn't cause any test failures related to this issue.
The text was updated successfully, but these errors were encountered: