Enable avoid_redundant_argument_values lint (#91409)

This commit is contained in:
Ian Hickson
2021-10-07 20:13:02 -07:00
committed by GitHub
parent 4bf7179e51
commit 5fd259be24
667 changed files with 1693 additions and 3385 deletions

View File

@@ -848,7 +848,7 @@ void main() {
);
// Widget
Map<String, dynamic> result = await getDiagnosticsTree(DiagnosticsType.widget, ByValueKey('Text'), depth: 0);
Map<String, dynamic> result = await getDiagnosticsTree(DiagnosticsType.widget, ByValueKey('Text'));
expect(result['children'], isNull); // depth: 0
expect(result['widgetRuntimeType'], 'Text');
@@ -857,7 +857,7 @@ void main() {
expect(stringProperty['description'], '"Hello World"');
expect(stringProperty['propertyType'], 'String');
result = await getDiagnosticsTree(DiagnosticsType.widget, ByValueKey('Text'), depth: 0, properties: false);
result = await getDiagnosticsTree(DiagnosticsType.widget, ByValueKey('Text'), properties: false);
expect(result['widgetRuntimeType'], 'Text');
expect(result['properties'], isNull); // properties: false
@@ -870,12 +870,12 @@ void main() {
expect(children.single['children'], isEmpty);
// RenderObject
result = await getDiagnosticsTree(DiagnosticsType.renderObject, ByValueKey('Text'), depth: 0);
result = await getDiagnosticsTree(DiagnosticsType.renderObject, ByValueKey('Text'));
expect(result['children'], isNull); // depth: 0
expect(result['properties'], isNotNull);
expect(result['description'], startsWith('RenderParagraph'));
result = await getDiagnosticsTree(DiagnosticsType.renderObject, ByValueKey('Text'), depth: 0, properties: false);
result = await getDiagnosticsTree(DiagnosticsType.renderObject, ByValueKey('Text'), properties: false);
expect(result['properties'], isNull); // properties: false
expect(result['description'], startsWith('RenderParagraph'));

View File

@@ -82,7 +82,7 @@ void main() {
});
test('logFilePathName was set when a new driver was created', () {
driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate, logCommunicationToFile: true);
driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate);
logFile = File(driver.logFilePathName);
expect(logFile.path, endsWith('.log'));
});
@@ -113,7 +113,7 @@ void main() {
});
test('printCommunication = false', () async {
driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate, printCommunication: false);
driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate);
await driver.waitFor(find.byTooltip('foo'), timeout: _kTestTimeout);
expect(log, <String>[]);
});
@@ -783,7 +783,7 @@ void main() {
});
test('printCommunication = false', () async {
driver = WebFlutterDriver.connectedTo(fakeConnection, printCommunication: false);
driver = WebFlutterDriver.connectedTo(fakeConnection);
await driver.waitFor(find.byTooltip('printCommunication test'), timeout: _kTestTimeout);
expect(log, <String>[]);
});

View File

@@ -502,7 +502,6 @@ void main() {
]).writeTimelineToFile(
'test',
destinationDirectory: tempDir.path,
includeSummary: true,
);
final String written =
await fs.file(path.join(tempDir.path, 'test.timeline.json')).readAsString();