-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
dart-archive/linter
#3741Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestcustomer-flutterdevexp-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.linter-false-negativeIssues related to lint rules that fail to report a problem.Issues related to lint rules that fail to report a problem.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Describe the issue
no_adjacent_strings_in_list should trigger when the collection if is missing a trailing comma.
To Reproduce
List<String> list = <String>[
'a',
'b'
'c'
];
triggers the lint but
List<String> list = <String>[
'a',
if (true) 'b'
'c'
];
does not.
Expected behavior
Lint warning: DON'T use adjacent strings in list. on the if (true) 'b' line.
Additional context
Real world bug:
https://github.com/flutter/flutter/pull/70325/files#diff-fbf1a86439c67e75e90a00f32fd2b789323582ced2f4f5cfea2d27a1af18aa30R427
jonahwilliams and srawlins
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestcustomer-flutterdevexp-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.linter-false-negativeIssues related to lint rules that fail to report a problem.Issues related to lint rules that fail to report a problem.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)