Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove no_adjacent_strings_in_list from enabled lint rules. #7878

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

srawlins
Copy link
Contributor

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

See dart-lang/linter#4076

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.

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.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@stuartmorgan
Copy link
Contributor

We should comment this out with an explanation, as with most other lints we don't use use (see the rest of the file), rather than removing it.

It's unfortunate that we're having to turn off a useful warning before we get the formatter change that would make the mistake the warning would catch obvious though.

@srawlins srawlins marked this pull request as draft October 17, 2024 14:12
@srawlins
Copy link
Contributor Author

I'll convert to draft for a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants