Enable missing_whitespace_between_adjacent_strings (#77027)
This commit is contained in:
parent
995bd989dd
commit
fc99e7c0d7
@ -125,7 +125,7 @@ linter:
|
|||||||
# - lines_longer_than_80_chars # not required by flutter style
|
# - lines_longer_than_80_chars # not required by flutter style
|
||||||
- list_remove_unrelated_type
|
- list_remove_unrelated_type
|
||||||
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
|
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
|
||||||
# - missing_whitespace_between_adjacent_strings # not yet tested
|
- missing_whitespace_between_adjacent_strings
|
||||||
- no_adjacent_strings_in_list
|
- no_adjacent_strings_in_list
|
||||||
# - no_default_cases # too many false positives
|
# - no_default_cases # too many false positives
|
||||||
- no_duplicate_case_values
|
- no_duplicate_case_values
|
||||||
|
@ -750,9 +750,9 @@ class TimeseriesStats {
|
|||||||
String toString() {
|
String toString() {
|
||||||
final StringBuffer buffer = StringBuffer();
|
final StringBuffer buffer = StringBuffer();
|
||||||
buffer.writeln(
|
buffer.writeln(
|
||||||
'$name: (samples: $cleanSampleCount clean/$outlierSampleCount outliers/'
|
'$name: (samples: $cleanSampleCount clean/$outlierSampleCount '
|
||||||
'${cleanSampleCount + outlierSampleCount} measured/'
|
'outliers/${cleanSampleCount + outlierSampleCount} '
|
||||||
'${samples.length} total)');
|
'measured/${samples.length} total)');
|
||||||
buffer.writeln(' | average: $average μs');
|
buffer.writeln(' | average: $average μs');
|
||||||
buffer.writeln(' | outlier average: $outlierAverage μs');
|
buffer.writeln(' | outlier average: $outlierAverage μs');
|
||||||
buffer.writeln(' | outlier/clean ratio: ${outlierRatio}x');
|
buffer.writeln(' | outlier/clean ratio: ${outlierRatio}x');
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
void test1() { }
|
void test1() { }
|
||||||
|
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
'Missing space ->.'
|
'Missing space ->.' //ignore: missing_whitespace_between_adjacent_strings
|
||||||
'This feature was deprecated after v1.2.3.'
|
'This feature was deprecated after v1.2.3.'
|
||||||
)
|
)
|
||||||
void test2() { }
|
void test2() { }
|
||||||
|
@ -72,8 +72,7 @@ abstract class DeviceDiscovery {
|
|||||||
case DeviceOperatingSystem.fuchsia:
|
case DeviceOperatingSystem.fuchsia:
|
||||||
return FuchsiaDeviceDiscovery();
|
return FuchsiaDeviceDiscovery();
|
||||||
case DeviceOperatingSystem.fake:
|
case DeviceOperatingSystem.fake:
|
||||||
print('Looking for fake devices!'
|
print('Looking for fake devices! You should not see this in release builds.');
|
||||||
'You should not see this in release builds.');
|
|
||||||
return FakeDeviceDiscovery();
|
return FakeDeviceDiscovery();
|
||||||
default:
|
default:
|
||||||
throw DeviceException('Unsupported device operating system: $deviceOperatingSystem');
|
throw DeviceException('Unsupported device operating system: $deviceOperatingSystem');
|
||||||
|
@ -126,7 +126,7 @@ void main() {
|
|||||||
const String updateTaskJson = '{'
|
const String updateTaskJson = '{'
|
||||||
'"CommitBranch":"master",'
|
'"CommitBranch":"master",'
|
||||||
'"CommitSha":"$commitSha",'
|
'"CommitSha":"$commitSha",'
|
||||||
'"BuilderName":"builder a b c",'
|
'"BuilderName":"builder a b c",' //ignore: missing_whitespace_between_adjacent_strings
|
||||||
'"NewStatus":"Succeeded",'
|
'"NewStatus":"Succeeded",'
|
||||||
'"ResultData":{},'
|
'"ResultData":{},'
|
||||||
'"BenchmarkScoreKeys":[]}';
|
'"BenchmarkScoreKeys":[]}';
|
||||||
|
@ -144,9 +144,7 @@ void main() {
|
|||||||
expect(input2.value, 'Text2');
|
expect(input2.value, 'Text2');
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Jump between TextFormFields with tab key after CapsLock is'
|
testWidgets('Jump between TextFormFields with tab key after CapsLock is activated', (WidgetTester tester) async {
|
||||||
'activated',
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
app.main();
|
app.main();
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
|
@ -849,11 +849,13 @@ class Actions extends StatefulWidget {
|
|||||||
// This allows this function to be called by code that doesn't know the
|
// This allows this function to be called by code that doesn't know the
|
||||||
// concrete type of the intent at compile time.
|
// concrete type of the intent at compile time.
|
||||||
final Type type = intent?.runtimeType ?? T;
|
final Type type = intent?.runtimeType ?? T;
|
||||||
assert(type != Intent,
|
assert(
|
||||||
|
type != Intent,
|
||||||
'The type passed to "find" resolved to "Intent": either a non-Intent '
|
'The type passed to "find" resolved to "Intent": either a non-Intent '
|
||||||
'generic type argument or an example intent derived from Intent must be '
|
'generic type argument or an example intent derived from Intent must be '
|
||||||
'specified. Intent may be used as the generic type as long as the optional '
|
'specified. Intent may be used as the generic type as long as the optional '
|
||||||
'"intent" argument is passed.');
|
'"intent" argument is passed.'
|
||||||
|
);
|
||||||
|
|
||||||
_visitActionsAncestors(context, (InheritedElement element) {
|
_visitActionsAncestors(context, (InheritedElement element) {
|
||||||
final _ActionsMarker actions = element.widget as _ActionsMarker;
|
final _ActionsMarker actions = element.widget as _ActionsMarker;
|
||||||
|
@ -794,7 +794,7 @@ void main() {
|
|||||||
for (final TextDirection textDirection in textDirectionOptions) {
|
for (final TextDirection textDirection in textDirectionOptions) {
|
||||||
for (final Widget? icon in iconOptions) {
|
for (final Widget? icon in iconOptions) {
|
||||||
final String testName = 'ElevatedButton'
|
final String testName = 'ElevatedButton'
|
||||||
', text scale $textScaleFactor'
|
', text scale $textScaleFactor' // ignore: missing_whitespace_between_adjacent_strings, https://github.com/dart-lang/linter/issues/2489
|
||||||
'${icon != null ? ", with icon" : ""}'
|
'${icon != null ? ", with icon" : ""}'
|
||||||
'${textDirection == TextDirection.rtl ? ", RTL" : ""}';
|
'${textDirection == TextDirection.rtl ? ", RTL" : ""}';
|
||||||
|
|
||||||
|
@ -1039,7 +1039,7 @@ void main() {
|
|||||||
for (final TextDirection textDirection in textDirectionOptions) {
|
for (final TextDirection textDirection in textDirectionOptions) {
|
||||||
for (final Widget? icon in iconOptions) {
|
for (final Widget? icon in iconOptions) {
|
||||||
final String testName = 'OutlinedButton'
|
final String testName = 'OutlinedButton'
|
||||||
', text scale $textScaleFactor'
|
', text scale $textScaleFactor' // ignore: missing_whitespace_between_adjacent_strings, https://github.com/dart-lang/linter/issues/2489
|
||||||
'${icon != null ? ", with icon" : ""}'
|
'${icon != null ? ", with icon" : ""}'
|
||||||
'${textDirection == TextDirection.rtl ? ", RTL" : ""}';
|
'${textDirection == TextDirection.rtl ? ", RTL" : ""}';
|
||||||
|
|
||||||
|
@ -1981,8 +1981,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'${SnackBarBehavior.floating} should align SnackBar with the top of FloatingActionButton'
|
'${SnackBarBehavior.floating} should align SnackBar with the top of FloatingActionButton when Scaffold has a FloatingActionButton',
|
||||||
'when Scaffold has a FloatingActionButton',
|
|
||||||
(WidgetTester tester) async {
|
(WidgetTester tester) async {
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
|
@ -832,7 +832,7 @@ void main() {
|
|||||||
for (final TextDirection textDirection in textDirectionOptions) {
|
for (final TextDirection textDirection in textDirectionOptions) {
|
||||||
for (final Widget? icon in iconOptions) {
|
for (final Widget? icon in iconOptions) {
|
||||||
final String testName = 'TextButton'
|
final String testName = 'TextButton'
|
||||||
', text scale $textScaleFactor'
|
', text scale $textScaleFactor' // ignore: missing_whitespace_between_adjacent_strings, https://github.com/dart-lang/linter/issues/2489
|
||||||
'${icon != null ? ", with icon" : ""}'
|
'${icon != null ? ", with icon" : ""}'
|
||||||
'${textDirection == TextDirection.rtl ? ", RTL" : ""}';
|
'${textDirection == TextDirection.rtl ? ", RTL" : ""}';
|
||||||
|
|
||||||
|
@ -43,8 +43,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'AutofillClients send the correct configuration to the platform'
|
'AutofillClients send the correct configuration to the platform and responds to updateEditingStateWithTag method correctly',
|
||||||
'and responds to updateEditingStateWithTag method correctly',
|
|
||||||
() async {
|
() async {
|
||||||
final FakeAutofillClient client1 = FakeAutofillClient(const TextEditingValue(text: 'test1'));
|
final FakeAutofillClient client1 = FakeAutofillClient(const TextEditingValue(text: 'test1'));
|
||||||
final FakeAutofillClient client2 = FakeAutofillClient(const TextEditingValue(text: 'test2'));
|
final FakeAutofillClient client2 = FakeAutofillClient(const TextEditingValue(text: 'test2'));
|
||||||
|
@ -1806,8 +1806,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'iOS autocorrection rectangle should appear on demand'
|
'iOS autocorrection rectangle should appear on demand and dismiss when the text changes or when focus is lost',
|
||||||
'and dismiss when the text changes or when focus is lost',
|
|
||||||
(WidgetTester tester) async {
|
(WidgetTester tester) async {
|
||||||
const Color rectColor = Color(0xFFFF0000);
|
const Color rectColor = Color(0xFFFF0000);
|
||||||
|
|
||||||
|
@ -572,6 +572,7 @@ void main() {
|
|||||||
outputStdout().join('\n'),
|
outputStdout().join('\n'),
|
||||||
"Knock Knock, Who's There " // initial message
|
"Knock Knock, Who's There " // initial message
|
||||||
' ' // placeholder so that spinner can backspace on its first tick
|
' ' // placeholder so that spinner can backspace on its first tick
|
||||||
|
// ignore: missing_whitespace_between_adjacent_strings
|
||||||
'\b\b\b\b\b\b\b\b $a' // first tick
|
'\b\b\b\b\b\b\b\b $a' // first tick
|
||||||
'\b\b\b\b\b\b\b\b ' // clearing the spinner
|
'\b\b\b\b\b\b\b\b ' // clearing the spinner
|
||||||
'\b\b\b\b\b\b\b\b' // clearing the clearing of the spinner
|
'\b\b\b\b\b\b\b\b' // clearing the clearing of the spinner
|
||||||
@ -580,6 +581,7 @@ void main() {
|
|||||||
'Rude Interrupting Cow\n' // message
|
'Rude Interrupting Cow\n' // message
|
||||||
"Knock Knock, Who's There " // message restoration
|
"Knock Knock, Who's There " // message restoration
|
||||||
' ' // placeholder so that spinner can backspace on its second tick
|
' ' // placeholder so that spinner can backspace on its second tick
|
||||||
|
// ignore: missing_whitespace_between_adjacent_strings
|
||||||
'\b\b\b\b\b\b\b\b $b' // second tick
|
'\b\b\b\b\b\b\b\b $b' // second tick
|
||||||
'\b\b\b\b\b\b\b\b ' // clearing the spinner to put the time
|
'\b\b\b\b\b\b\b\b ' // clearing the spinner to put the time
|
||||||
'\b\b\b\b\b\b\b\b' // clearing the clearing of the spinner
|
'\b\b\b\b\b\b\b\b' // clearing the clearing of the spinner
|
||||||
|
@ -118,7 +118,7 @@ void main() {
|
|||||||
testWithoutContext('String', () {
|
testWithoutContext('String', () {
|
||||||
expect(
|
expect(
|
||||||
GitHubTemplateCreator.sanitizedCrashException(
|
GitHubTemplateCreator.sanitizedCrashException(
|
||||||
'May have non-tool-internal info, very long string, 0b8abb4724aa590dd0f429683339b'
|
'May have non-tool-internal info, very long string, 0b8abb4724aa590dd0f429683339b' // ignore: missing_whitespace_between_adjacent_strings
|
||||||
'24aa590dd0f429683339b1e045a1594d0b8abb4724aa590dd0f429683339b1e045a1594d0b8abb'
|
'24aa590dd0f429683339b1e045a1594d0b8abb4724aa590dd0f429683339b1e045a1594d0b8abb'
|
||||||
'24aa590dd0f429683339b1e045a1594d0b8abb4724aa590dd0f429683339b1e045a1594d0b8abb'
|
'24aa590dd0f429683339b1e045a1594d0b8abb4724aa590dd0f429683339b1e045a1594d0b8abb'
|
||||||
'24aa590dd0f429683339b1e045a1594d0b8abb4724aa590dd0f429683339b1e045a1594d0b8abb'
|
'24aa590dd0f429683339b1e045a1594d0b8abb4724aa590dd0f429683339b1e045a1594d0b8abb'
|
||||||
|
@ -40,8 +40,8 @@ void main() {
|
|||||||
group('syslog stream', () {
|
group('syslog stream', () {
|
||||||
testWithoutContext('decodeSyslog decodes a syslog-encoded line', () {
|
testWithoutContext('decodeSyslog decodes a syslog-encoded line', () {
|
||||||
final String decoded = decodeSyslog(
|
final String decoded = decodeSyslog(
|
||||||
r'I \M-b\M^]\M-$\M-o\M-8\M^O syslog \M-B\M-/\'
|
r'I \M-b\M^]\M-$\M-o\M-8\M^O syslog '
|
||||||
r'134_(\M-c\M^C\M^D)_/\M-B\M-/ \M-l\M^F\240!');
|
r'\M-B\M-/\134_(\M-c\M^C\M^D)_/\M-B\M-/ \M-l\M^F\240!');
|
||||||
|
|
||||||
expect(decoded, r'I ❤️ syslog ¯\_(ツ)_/¯ 솠!');
|
expect(decoded, r'I ❤️ syslog ¯\_(ツ)_/¯ 솠!');
|
||||||
});
|
});
|
||||||
|
@ -82,8 +82,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWithoutContext('Picks up changes to the .packages file and updates package_config.json'
|
testWithoutContext('Picks up changes to the .packages file and updates package_config.json, asyncScanning: $asyncScanning', () async {
|
||||||
', asyncScanning: $asyncScanning', () async {
|
|
||||||
final DateTime past = DateTime.now().subtract(const Duration(seconds: 1));
|
final DateTime past = DateTime.now().subtract(const Duration(seconds: 1));
|
||||||
final FileSystem fileSystem = MemoryFileSystem.test();
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||||
const PackageConfig packageConfig = PackageConfig.empty;
|
const PackageConfig packageConfig = PackageConfig.empty;
|
||||||
@ -124,9 +123,7 @@ void main() {
|
|||||||
]));
|
]));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWithoutContext('Picks up changes to the .packages file and updates PackageConfig, asyncScanning: $asyncScanning', () async {
|
||||||
testWithoutContext('Picks up changes to the .packages file and updates PackageConfig'
|
|
||||||
', asyncScanning: $asyncScanning', () async {
|
|
||||||
final FileSystem fileSystem = MemoryFileSystem.test();
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||||
const PackageConfig packageConfig = PackageConfig.empty;
|
const PackageConfig packageConfig = PackageConfig.empty;
|
||||||
final ProjectFileInvalidator projectFileInvalidator = ProjectFileInvalidator(
|
final ProjectFileInvalidator projectFileInvalidator = ProjectFileInvalidator(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user