Skip to content
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

Add a hint to identify unused variables #16812

Closed
bwilkerson opened this issue Feb 13, 2014 · 7 comments
Closed

Add a hint to identify unused variables #16812

bwilkerson opened this issue Feb 13, 2014 · 7 comments
Labels
analyzer-warning Issues with the analyzer's Warning codes area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@bwilkerson
Copy link
Member

There should be a hint that would identify unused variables. The following are some examples:

import 'dart:html';
int myint1;//Not Used
int myint2=0;//Not Used
void main() {
    int myint3=0;//Not Used
    int myint4;//Not Used
    String myStr;//Not Used
}

@bwilkerson
Copy link
Member Author

Honestly, this issue was created to capture a user request on the dart-editor mailing list, and I have not given it much thought. I expect that our first pass would only flag local variables in order to avoid such questions. But it's a good question, and one we would need to discuss before trying to do this for top-level variables.

@clayberg
Copy link

clayberg commented Apr 1, 2014

Added Analyzer-Hint label.

@srawlins
Copy link
Member

This is a dup of Issue #12256, yes?

@bwilkerson
Copy link
Member Author

This is a dup of Issue #12256, yes?

Almost. This adds a request for detecting unused top-level variables as well.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@bwilkerson bwilkerson added Type-Enhancement area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-warning Issues with the analyzer's Warning codes labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
@srawlins
Copy link
Member

This hint exists. Close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-warning Issues with the analyzer's Warning codes area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants