-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
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.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Describe the rule you'd like to see implemented
We should replace no_adjacent_strings_in_list with a new lint rule, no_adjacent_strings_in_collections, which would catch adjacent strings in sets, lists, if-elements, and for-elements.
Examples
[
if (1 == 2) 'a' // LINT
'b'
];
[
for (var v in []) 'a' // LINT
'b'
];Additional context
It would be a breaking change to add if-collection and for-collection support to no_adjacent_strings_in_list (dart-archive/linter#2726). It would not make naming sense to add set support to that existing rule, and also be a breaking change.
I can't conceive of a reason someone would want adjacent strings reported in lists but not sets, or vice versa, so it makes sense to put them in one rule.
pq and albertms10
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.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug