Skip to content

Linter rule prefer_adjacent_string_concatenation conflicts with no_adjacent_strings_in_list #59041

@quoc-huynh-cosee

Description

@quoc-huynh-cosee

Describe the issue
I have e.g. a very long string in a list, which I need to splite into separate parts (to avoid lines longer than 80 characters). If I try to do this using the + I'm receiving the prefer_adjacent_string_concatenation warning.

To Reproduce
The following code gives me a lint warning prefer_adjacent_string_concatenation.

final myList = [
  'very long string' +
    'continue very long string'
]

But doing this with the quick fix, I'm receiving no_adjacent_strings_in_list.

final myList = [
  'very long string' 
    'continue very long string'
]

Expected behavior
The linter won't raise the warning prefer_adjacent_string_concatenation in lists.

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagelinter-set-recommendedtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions