question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VS Code extension: Do not warn about unused `using`s

See original GitHub issue

The C# extension and VS Code already show recommendations to remove unused usings in any open C# file. However the warnings for this same cleanup recommendation make it more difficult to find real issues in the project. Note projects w/ unused usings build without warnings.

The warnings in the IDE are inconsistent as well: VS code doesn’t even show a recommendation to simplify the namespace qualification in the statement below.

using System;
using System.Threading.Tasks;

...
    var result = System.Threading.Tasks.Task.FromResult(0);

For example, in a recently-created project using a VS template: usings

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
DustinCampbellcommented, Feb 8, 2017

It is annoying. Agreed 100%. 😄

I (finally) filed an official request on VS Code for faded code: https://github.com/Microsoft/vscode/issues/20219.

1reaction
DustinCampbellcommented, Feb 8, 2017

(Very glad to see you here @Eilon 😄)

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS code doesn't gray out unused variables - Stack Overflow
vscode has @builtin extensions. One of them is typescript and javascript language features . If it is disabled the features will not work....
Read more >
How to highlight unused Python variables in VS Code
A quick intro to Pylance + VS Code. ... Here you can see that the vars y , z and q are greyed...
Read more >
User and Workspace Settings - Visual Studio Code
If you're using a workspace that needs custom settings but you don't want ... "warning", // Validate link definitions that are unused in...
Read more >
Configuring Warnings in Visual Basic - Visual Studio (Windows)
Learn about how you can configure warnings in Visual Basic which, in turn, will help you write cleaner, faster, better code with fewer...
Read more >
“Unused include” warning - What is clangd?
In your configuration file, set Diagnostics.UnusedIncludes to Strict or None . You can also disable analysis of particular files (using If blocks), and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found