Add missing trailing commas (#28673)

* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
This commit is contained in:
Alexandre Ardhuin
2019-03-01 08:17:55 +01:00
committed by GitHub
parent 046f960ae2
commit 387f885481
626 changed files with 5183 additions and 5183 deletions

View File

@@ -92,7 +92,7 @@ void main() {
expect(escapePath('foo\\bar\\cool.dart'), 'foo\\\\bar\\\\cool.dart');
expect(escapePath('C:/foo/bar/cool.dart'), 'C:/foo/bar/cool.dart');
}, overrides: <Type, Generator>{
Platform: () => FakePlatform(operatingSystem: 'windows')
Platform: () => FakePlatform(operatingSystem: 'windows'),
});
testUsingContext('on Linux', () {
@@ -100,7 +100,7 @@ void main() {
expect(escapePath('foo/bar/cool.dart'), 'foo/bar/cool.dart');
expect(escapePath('foo\\cool.dart'), 'foo\\cool.dart');
}, overrides: <Type, Generator>{
Platform: () => FakePlatform(operatingSystem: 'linux')
Platform: () => FakePlatform(operatingSystem: 'linux'),
});
});
}

View File

@@ -26,7 +26,7 @@ void main() {
'Download failed -- attempting retry 1 in 1 second...\n'
'Download failed -- attempting retry 2 in 2 seconds...\n'
'Download failed -- attempting retry 3 in 4 seconds...\n'
'Download failed -- attempting retry 4 in 8 seconds...\n'
'Download failed -- attempting retry 4 in 8 seconds...\n',
);
});
expect(testLogger.errorText, isEmpty);
@@ -49,7 +49,7 @@ void main() {
'Download failed -- attempting retry 1 in 1 second...\n'
'Download failed -- attempting retry 2 in 2 seconds...\n'
'Download failed -- attempting retry 3 in 4 seconds...\n'
'Download failed -- attempting retry 4 in 8 seconds...\n'
'Download failed -- attempting retry 4 in 8 seconds...\n',
);
});
expect(testLogger.errorText, isEmpty);
@@ -72,7 +72,7 @@ void main() {
'Download failed -- attempting retry 1 in 1 second...\n'
'Download failed -- attempting retry 2 in 2 seconds...\n'
'Download failed -- attempting retry 3 in 4 seconds...\n'
'Download failed -- attempting retry 4 in 8 seconds...\n'
'Download failed -- attempting retry 4 in 8 seconds...\n',
);
});
expect(testLogger.errorText, isEmpty);

View File

@@ -32,7 +32,7 @@ void main() {
expect(utils.which(kExecutable), isNull);
}, overrides: <Type, Generator>{
ProcessManager: () => mockProcessManager,
Platform: () => FakePlatform(operatingSystem: 'linux')
Platform: () => FakePlatform(operatingSystem: 'linux'),
});
testUsingContext('returns exactly one result', () async {
@@ -42,7 +42,7 @@ void main() {
expect(utils.which(kExecutable).path, kPath1);
}, overrides: <Type, Generator>{
ProcessManager: () => mockProcessManager,
Platform: () => FakePlatform(operatingSystem: 'linux')
Platform: () => FakePlatform(operatingSystem: 'linux'),
});
testUsingContext('returns all results for whichAll', () async {
@@ -55,7 +55,7 @@ void main() {
expect(result[1].path, kPath2);
}, overrides: <Type, Generator>{
ProcessManager: () => mockProcessManager,
Platform: () => FakePlatform(operatingSystem: 'linux')
Platform: () => FakePlatform(operatingSystem: 'linux'),
});
});
@@ -68,7 +68,7 @@ void main() {
expect(utils.which(kExecutable), isNull);
}, overrides: <Type, Generator>{
ProcessManager: () => mockProcessManager,
Platform: () => FakePlatform(operatingSystem: 'windows')
Platform: () => FakePlatform(operatingSystem: 'windows'),
});
testUsingContext('returns exactly one result', () async {
@@ -78,7 +78,7 @@ void main() {
expect(utils.which(kExecutable).path, kPath1);
}, overrides: <Type, Generator>{
ProcessManager: () => mockProcessManager,
Platform: () => FakePlatform(operatingSystem: 'windows')
Platform: () => FakePlatform(operatingSystem: 'windows'),
});
testUsingContext('returns all results for whichAll', () async {
@@ -91,7 +91,7 @@ void main() {
expect(result[1].path, kPath2);
}, overrides: <Type, Generator>{
ProcessManager: () => mockProcessManager,
Platform: () => FakePlatform(operatingSystem: 'windows')
Platform: () => FakePlatform(operatingSystem: 'windows'),
});
});
}

View File

@@ -87,7 +87,7 @@ void main() {
Logger: () => mockLogger,
ProcessManager: () => mockProcessManager,
OutputPreferences: () => OutputPreferences(wrapText: true, wrapColumn: 40),
Platform: () => FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false
Platform: () => FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false,
});
});
}