proposal: no_leading_underscore_for_local_functions
#58664
Labels
devexp-linter
Issues with the analyzer's support for the linter package
legacy-area-analyzer
Use area-devexp instead.
linter-lint-proposal
linter-status-pending
no_leading_underscore_for_local_functions
Description
Do not name local functions with a leading underscore: their visibility is dictated by local scope. Similar to
no_leading_underscore_for_local_variables
.Details
no_leading_underscore_for_local_variables
does not trigger on local functions. Rather than treat that as a false negative, which is hard to land, we can just create a new rule.I often catch this in readability reviews.
Kind
Does this enforce style advice? Guard against errors? Other?
Style, I suppose. Meets with Effective Dart recommendations.
Good Examples
Bad Examples
Discussion
Discussion checklist
The text was updated successfully, but these errors were encountered: