missing_whitespace_between_adjacent_strings
Missing whitespace between adjacent strings.
This rule is available as of Dart 2.8.
Details
#Add a trailing whitespace to prevent missing whitespace between adjacent strings.
With long text split across adjacent strings it's easy to forget a whitespace between strings.
BAD:
var s =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed'
'do eiusmod tempor incididunt ut labore et dolore magna';
GOOD:
var s =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed '
'do eiusmod tempor incididunt ut labore et dolore magna';
Usage
#To enable the missing_whitespace_between_adjacent_strings
rule, add missing_whitespace_between_adjacent_strings
under linter > rules in your analysis_options.yaml
file:
linter:
rules:
- missing_whitespace_between_adjacent_strings
Unless stated otherwise, the documentation on this site reflects Dart 3.5.4. Page last updated on 2024-07-03. View source or report an issue.