-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Hints like unused_local_variable
missing from linter docs
#48553
Comments
unused_local_variable is not a Lint defined in the linter, but a Hint (more like a Warning) defined in the SDK. See https://dart.dev/tools/diagnostic-messages#unused_local_variable. |
CC @bwilkerson. I think you discussed a common diagnostics location, on another issue. |
Yes, we've discussed moving the lint documentation to the same location as the other diagnostics. Not sure whether it's a good idea (especially given the evidence that some users are very familiar with the current location), but even if it would be a good idea, it's probably not a high priority. |
Maybe if there is was some indication in the |
Confusion abounds. :-( A diagnostic is an indication of a problem in the code. A lint is a diagnostic that is disabled by default. The fact that lints are implemented in the
I'm not sure whether that would be a good thing or not. Ideally the user shouldn't need to know which are from lints. Of course, the current state is not ideal, so ... :-/ But I will point out that |
I thought it was the default behavior, but it appears that you need to include the
|
unused_local_variable
missing from docsunused_local_variable
missing from linter docs
I think the core issue raised here is that linter rules are treated differently by the analyzer from other diagnostics. To solve this, we're currently working on adding consistent diagnostic documentation for linter rules to the same location and in the same format as other diagnostics. We're tracking that work in dart-lang/site-www#4498 among other issues, so perhaps this issue can be closed in favor of those. |
Describe the issue
https://dart-lang.github.io/linter/lints/index.html
https://dart-lang.github.io/linter/lints/unused_local_variable.html - 404 error
The text was updated successfully, but these errors were encountered: