Enable avoid_implementing_value_types lint (#91078)

This commit is contained in:
Ian Hickson
2021-10-04 13:48:04 -07:00
committed by GitHub
parent 7b8a3c1bcd
commit 2bab6514b0
30 changed files with 202 additions and 134 deletions

View File

@@ -778,6 +778,9 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService
Uri get uri => Uri.parse('http://localhost:8181');
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeAndroidDevice extends Fake implements AndroidDevice {
FakeAndroidDevice({@required this.id});
@@ -837,6 +840,9 @@ class FakeAndroidDevice extends Fake implements AndroidDevice {
Category get category => Category.mobile;
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeIOSDevice extends Fake implements IOSDevice {
FakeIOSDevice({this.dds, this.portForwarder, this.logReader});

View File

@@ -563,6 +563,9 @@ class FakeIOSWorkflow extends Fake implements IOSWorkflow {
final bool canListDevices;
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeAndroidDevice extends Fake implements AndroidDevice {
@override
final String id = 'device';

View File

@@ -1021,6 +1021,9 @@ class FakeDeviceManager extends Fake implements DeviceManager {
Future<List<String>> getDeviceDiagnostics() async => diagnostics;
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device {
@override
String get name => 'name';

View File

@@ -102,6 +102,9 @@ void main() {
});
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class ScreenshotDevice extends Fake implements Device {
@override
Future<void> takeScreenshot(File outputFile) async {}

View File

@@ -78,6 +78,9 @@ class FakeApplicationPackageFactory extends Fake implements ApplicationPackageFa
class FakeIOSApp extends Fake implements IOSApp { }
class FakeAndroidApk extends Fake implements AndroidApk { }
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeIOSDevice extends Fake implements IOSDevice {
@override
Future<TargetPlatform> get targetPlatform async => TargetPlatform.ios;
@@ -95,6 +98,9 @@ class FakeIOSDevice extends Fake implements IOSDevice {
}) async => true;
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeAndroidDevice extends Fake implements AndroidDevice {
@override
Future<TargetPlatform> get targetPlatform async => TargetPlatform.android_arm;

View File

@@ -475,6 +475,9 @@ class TestRunCommand extends RunCommand {
}
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device {
FakeDevice({bool isLocalEmulator = false, TargetPlatform targetPlatform = TargetPlatform.ios, String sdkNameAndVersion = ''})
: _isLocalEmulator = isLocalEmulator,

View File

@@ -190,6 +190,9 @@ AndroidDevice createFakeDevice(int sdkLevel) {
);
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeAndroidDevice extends Fake implements AndroidDevice {
FakeAndroidDevice(this._apiVersion, this._lastLogcatTimestamp);

View File

@@ -175,6 +175,9 @@ class FakeFlutterDevice extends Fake implements FlutterDevice {
Future<void> initLogReader() async { }
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device {
@override
bool isSupported() => true;

View File

@@ -531,6 +531,9 @@ class FakeApplicationPackageFactory extends Fake implements ApplicationPackageFa
class FakeApplicationPackage extends Fake implements ApplicationPackage { }
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device {
FakeDevice(this.result, {this.supportsFlutterExit = true});

View File

@@ -283,6 +283,9 @@ WebDriverService setUpDriverService() {
);
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device {
@override
final PlatformType platformType = PlatformType.web;

View File

@@ -887,6 +887,9 @@ class FuchsiaModulePackage extends ApplicationPackage {
final String name;
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class MockFuchsiaDevice extends Fake implements FuchsiaDevice {
MockFuchsiaDevice(this.id, this.portForwarder, this._ipv6);

View File

@@ -606,6 +606,9 @@ class FakeDevFs extends Fake implements DevFS {
Uri baseUri;
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device {
bool disposed = false;

View File

@@ -288,6 +288,9 @@ class FakeMDnsClient extends Fake implements MDnsClient {
void stop() {}
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeIOSDevice extends Fake implements IOSDevice {
@override
Future<TargetPlatform> get targetPlatform async => TargetPlatform.ios;

View File

@@ -471,4 +471,7 @@ class FakeFlutterDevice extends Fake implements FlutterDevice {
TargetPlatform targetPlatform = TargetPlatform.android_arm;
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device { }

View File

@@ -2220,6 +2220,9 @@ class FakeProjectFileInvalidator extends Fake implements ProjectFileInvalidator
}
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device {
FakeDevice({
String sdkNameAndVersion = 'Android',

View File

@@ -193,6 +193,9 @@ class FakeWebDevFS extends Fake implements WebDevFS {
}
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeWebDevice extends Fake implements Device {
@override
String get name => 'web';

View File

@@ -1030,8 +1030,14 @@ ResidentRunner setUpResidentRunner(FlutterDevice flutterDevice, {
);
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeWebServerDevice extends FakeDevice implements WebServerDevice { }
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device {
@override
String name;
@@ -1101,6 +1107,9 @@ class FakeAppConnection extends Fake implements AppConnection {
}
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeChromeDevice extends Fake implements ChromiumDevice { }
class FakeWipDebugger extends Fake implements WipDebugger { }

View File

@@ -1372,6 +1372,9 @@ class FakeResidentDevtoolsHandler extends Fake implements ResidentDevtoolsHandle
}
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device {
@override
bool isSupported() => true;

View File

@@ -835,6 +835,9 @@ class MockVMService extends Fake implements vm_service.VmService {
}
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
class FakeDevice extends Fake implements Device { }
class FakeFlutterVersion extends Fake implements FlutterVersion {