-
Notifications
You must be signed in to change notification settings - Fork 677
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
Fadeout unused variable names #3733
Conversation
a7b4091
to
59dd38a
Compare
Codecov Report
@@ Coverage Diff @@
## master #3733 +/- ##
=======================================
Coverage 87.00% 87.00%
=======================================
Files 59 59
Lines 1777 1777
Branches 209 209
=======================================
Hits 1546 1546
Misses 176 176
Partials 55 55
Continue to review full report at Codecov.
|
@brettfo PTAL |
nice |
I still don't see this functionality in VSCode as of today, is there a planned release date? |
@marcospgp If you are not seeing these in your vscode, it is most likely that the WarningLevel configured in your csproj is lower than 4. The compiler only reports these diagnostics when warning level is set to 4. |
@JoeRobich Ok I think I found a bug with this functionality then, take a look at this: When you create a variable that references a field of the class, it no longer is identified as never used, even if you do never use it in the function. |
@marcospgp This seems to be a case covered by dotnet/roslyn#15695 |
Revisiting this today, I double checked that:
But unused fields still are not faded out: |
Currently unused variables are only faded out when
omnisharp.enableRoslynAnalyzers
is enabled. This change adds it to the list of compiler diagnostics we fadeout even when analyzers are disabled.fixes #1324