-
Notifications
You must be signed in to change notification settings - Fork 676
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
Highlight unused variables in the editor #1324
Comments
@Pilchie: Is there an equivalent request for roslyn? |
No - the compiler already issues a warning, so there should be a squiggle (maybe not if it's initialized to an expression that might have side-effects though). We did just take a PR to support a code fix to remove unused variables with that warning though. |
That's what I was thinking. Also, we don't have the ability to fade things out in VS Code. FWIW, it'd be great if Roslyn marked that particular diagnostic with an Unnecessary tag. Any chance we could get @CyrusNajmabadi to do that? 😄 |
👀 |
I have this line in C#:
The variable Why I don't get a warning or a squiggle? |
This should light up once analyzers are moved over to the .NET SDK |
Any ETA on this? Thanks guys! |
knock knock |
I don't believe there's been any progress on this. I imagine a PR would be accepted to enable that behavior if someone wanted to contribute it. |
@CyrusNajmabadi See here :) #3733 |
Environment data
dotnet --info
output:VS Code version: 1.10.2
C# Extension version:1.8.0
Steps to reproduce
Create a variable and assign it a value. Don't use that variable.
Expected behavior
A highlighted or slightly greyed out variable name
Actual behavior
Nothing
The text was updated successfully, but these errors were encountered: