DiagnosticDescriptor: Support fading out code different from the primary location #6697
Labels
Area: C#
C# rules related issues.
Area: VB.NET
VB.NET rules related issues.
Type: Cleanup
Improve and cleanup code base
Some rules fade out code to indicate unused code:
We use the
bool fadeOutCode
parameter to make the IDE aware of unused code:sonar-dotnet/analyzers/src/SonarAnalyzer.Common/DiagnosticAnalyzer/DiagnosticDescriptorFactory.cs
Line 39 in bbd3433
This falls short in cases like above because the code is not just faded out but also squiggled. There is a more flexible way used by Roslyn where the out-fading can be specified separate from the primary location. So in cases like above, we could squiggle the method name and fade out the entire declaration.
These are the rules that fade out code at the moment and may benefit from a more fine grained fadeOutCode behavior.
Original discussion #6679 (comment)
The text was updated successfully, but these errors were encountered: