-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
dart-archive/linter
#3361Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.
Description
The following code does not produce a no_leading_underscores_for_local_identifiers lint, even though I would have expected it to complain about _bar:
int foo() {
int _bar() { // Why no no_leading_underscores_for_local_identifiers lint here?
return 10;
}
return _bar();
}Complaining here would also seem to be in line with "Effective Dart" [1] (emphasize mine):
There is no concept of “private” for local variables, parameters, local functions, or library prefixes. When one of those has a name that starts with an underscore, it sends a confusing signal to the reader. To avoid that, don’t use leading underscores in those names.
srawlins, pq, albertms10 and smolikja
Metadata
Metadata
Assignees
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.