Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 0f0540b

Browse files
authored
Correct typo in missing_whitespace_between_adjacent_strings (#2738)
1 parent 869904f commit 0f0540b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/src/rules/missing_whitespace_between_adjacent_strings.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ extension on StringLiteral {
118118
return self.value.startsWithWhitespace;
119119
} else if (self is StringInterpolation) {
120120
var first = self.elements.first as InterpolationString;
121-
return first.value.isEmpty || first.value.endsWithWhitespace;
121+
return first.value.isEmpty || first.value.startsWithWhitespace;
122122
}
123123
throw ArgumentError(
124124
'Expected SimpleStringLiteral or StringInterpolation, but got '

test_data/rules/missing_whitespace_between_adjacent_strings.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ f(o) {
3333
'b');
3434
f('a' // OK
3535
'$o b');
36+
f("a $o b" // OK
37+
" c$o");
3638
}
3739

3840
void matches(String value) {}

0 commit comments

Comments
 (0)