Remove no_adjacent_strings_in_list from enabled lint rules. (#7878)

`no_adjacent_strings_in_list` conflicts with another rule, `prefer_adjacent_string_concatenation`. I suggest removing the former.

See https://github.com/dart-lang/sdk/issues/59041

`prefer_adjacent_string_concatenation` is a style-oriented rule, but it is in the package:lints recommended set. So... it is recommended.

`no_adjacent_strings_in_list` is an error-preventing lint rule, but it's usefulness is waning, as the [new style of the Dart formatter will always split adjacent strings into new lines](https://github.com/dart-lang/sdk/issues/59041).

We are marking these two lint rules as incompatible. If the fix in this PR is not desired, there are two other options:

* Remove `prefer_adjacent_string_concatenation` from the enabled lint rules.
* Insert an `# ignore:` comment in the top-level analysis options file, and an `# ignore: included_file_warning` comment in any files that include the top-level one.
This commit is contained in:
Sam Rawlins
2025-12-02 12:49:49 -08:00
committed by GitHub
parent 4623a47452
commit 8cb49035b1

View File

@@ -114,7 +114,7 @@ linter:
# - matching_super_parameters # blocked on https://github.com/dart-lang/language/issues/2509
- missing_code_block_language_in_doc_comment
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
# - no_adjacent_strings_in_list # conflicts with prefer_adjacent_string_concatenation
- no_default_cases
- no_duplicate_case_values
- no_leading_underscores_for_library_prefixes