missing_whitespace_between_adjacent_strings
Missing whitespace between adjacent strings.
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:
dart
var s =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed'
'do eiusmod tempor incididunt ut labore et dolore magna';
GOOD:
dart
var s =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed '
'do eiusmod tempor incididunt ut labore et dolore magna';
Enable
#To enable the missing_whitespace_between_adjacent_strings
rule,
add missing_whitespace_between_adjacent_strings
under linter > rules in your
analysis_options.yaml
file:
analysis_options.yaml
yaml
linter:
rules:
- missing_whitespace_between_adjacent_strings
If you're instead using the YAML map syntax to configure linter rules,
add missing_whitespace_between_adjacent_strings: true
under linter > rules:
analysis_options.yaml
yaml
linter:
rules:
missing_whitespace_between_adjacent_strings: true
除非另有说明,文档之所提及适用于 Dart 3.7.2 版本,本页面最后更新时间: 2025-03-07。 查看文档源码 或者 报告页面问题。