Unverified Commit d3b60d46 authored by Elias Yishak's avatar Elias Yishak Committed by GitHub

Clean up lint ignores (#144229)

Fixes:
- https://github.com/dart-lang/tools/issues/234

Bumps the version for package:unified_analytics and removes TODOs and lint ignores
parent fdb17ab0
......@@ -435,7 +435,7 @@ class Environment {
processManager: processManager,
platform: platform ?? FakePlatform(),
usage: usage ?? TestUsage(),
analytics: analytics ?? NoOpAnalytics(),
analytics: analytics ?? const NoOpAnalytics(),
engineVersion: engineVersion,
generateDartPluginRegistry: generateDartPluginRegistry,
);
......
......@@ -92,7 +92,7 @@ class XcodeProjectInterpreter {
logger: BufferLogger.test(),
version: version,
build: build,
analytics: analytics ?? NoOpAnalytics(),
analytics: analytics ?? const NoOpAnalytics(),
);
}
......
......@@ -39,7 +39,7 @@ Analytics getAnalytics({
runningOnBot ||
// Ignore when suppressed by FLUTTER_SUPPRESS_ANALYTICS.
suppressEnvFlag) {
return NoOpAnalytics();
return const NoOpAnalytics();
}
// Providing an override of the [Analytics] instance is preferred when
......
......@@ -51,7 +51,7 @@ dependencies:
http_multi_server: 3.2.1
convert: 3.1.1
async: 2.11.0
unified_analytics: 5.8.1
unified_analytics: 5.8.4
cli_config: 0.1.2
graphs: 2.3.1
......@@ -119,4 +119,4 @@ dartdoc:
# Exclude this package from the hosted API docs.
nodoc: true
# PUBSPEC CHECKSUM: 588f
# PUBSPEC CHECKSUM: c492
......@@ -157,7 +157,7 @@ void main() {
preliminaryMDnsClient: FakeMDnsClient(<PtrResourceRecord>[], <String, List<SrvResourceRecord>>{}),
logger: logger,
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
),
});
......@@ -221,7 +221,7 @@ void main() {
preliminaryMDnsClient: FakeMDnsClient(<PtrResourceRecord>[], <String, List<SrvResourceRecord>>{}),
logger: logger,
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
),
Signals: () => FakeSignals(),
});
......@@ -291,7 +291,7 @@ void main() {
preliminaryMDnsClient: FakeMDnsClient(<PtrResourceRecord>[], <String, List<SrvResourceRecord>>{}),
logger: logger,
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
),
ProcessManager: () => FakeProcessManager.empty(),
});
......@@ -361,7 +361,7 @@ void main() {
),
logger: logger,
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
),
});
......@@ -432,7 +432,7 @@ void main() {
),
logger: logger,
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
),
});
......@@ -507,7 +507,7 @@ void main() {
),
logger: logger,
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
),
});
......@@ -582,7 +582,7 @@ void main() {
),
logger: logger,
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
),
});
......
......@@ -67,7 +67,7 @@ void main() {
logger: logger,
appFilenamePattern: RegExp(r'lib.*app\.so'),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Archive archive = Archive()
......@@ -152,7 +152,7 @@ void main() {
logger: logger,
appFilenamePattern: RegExp(r'lib.*app\.so'),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Archive archive = Archive()
......@@ -195,7 +195,7 @@ void main() {
logger: logger,
appFilenamePattern: RegExp(r'lib.*app\.so'),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Directory outputDirectory = fileSystem.directory('example/out/foo.app')
......@@ -239,7 +239,7 @@ void main() {
logger: logger,
appFilenamePattern: RegExp(r'lib.*app\.so'),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Directory outputDirectory = fileSystem.directory('example/out/foo.app')..createSync(recursive: true);
......
......@@ -73,7 +73,7 @@ void main() {
platform: platform,
processManager: fakeProcessManager,
usage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
});
......@@ -186,7 +186,7 @@ void main() {
platform: platform,
processManager: fakeProcessManager,
usage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
fileSystem.file(xcodebuild).deleteSync();
......@@ -513,7 +513,7 @@ void main() {
platform: platform,
processManager: fakeProcessManager,
usage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(await xcodeProjectInterpreter.getInfo(workingDirectory), isNotNull);
......@@ -540,7 +540,7 @@ void main() {
platform: platform,
processManager: fakeProcessManager,
usage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(() => xcodeProjectInterpreter.getInfo(workingDirectory), throwsToolExit(message: stderr));
......@@ -567,7 +567,7 @@ void main() {
platform: platform,
processManager: fakeProcessManager,
usage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(() => xcodeProjectInterpreter.getInfo(workingDirectory), throwsToolExit(message: stderr));
......
......@@ -517,7 +517,7 @@ void main() {
fileSystem: fileSystem,
coreDeviceControl: FakeIOSCoreDeviceControl(),
xcodeDebug: FakeXcodeDebug(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
});
......
......@@ -60,7 +60,7 @@ void main() {
preliminaryMDnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.queryForAttach();
......@@ -84,7 +84,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.queryForAttach();
......@@ -112,7 +112,7 @@ void main() {
preliminaryMDnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(portDiscovery.queryForAttach, throwsToolExit());
......@@ -136,7 +136,7 @@ void main() {
preliminaryMDnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.queryForAttach();
......@@ -164,7 +164,7 @@ void main() {
preliminaryMDnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(portDiscovery.queryForAttach, throwsToolExit());
......@@ -176,7 +176,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final int? port = (await portDiscovery.queryForAttach())?.port;
......@@ -228,7 +228,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final int? port = (await portDiscovery.queryForAttach())?.port;
expect(port, 123);
......@@ -256,7 +256,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.queryForAttach();
expect(result?.port, 123);
......@@ -284,7 +284,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final int? port = (await portDiscovery.queryForAttach(applicationId: 'fiz'))?.port;
expect(port, 321);
......@@ -313,7 +313,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final int? port = (await portDiscovery.queryForAttach(applicationId: 'bar'))?.port;
expect(port, 1234);
......@@ -330,7 +330,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(
() async => portDiscovery.queryForAttach(),
......@@ -356,7 +356,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Uri? uri = await portDiscovery.getVMServiceUriForAttach('bar', device, hostVmservicePort: 0);
expect(uri.toString(), 'http://127.0.0.1:123/');
......@@ -390,7 +390,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Uri? uri = await portDiscovery.getVMServiceUriForAttach(
'bar',
......@@ -428,7 +428,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Uri? uri = await portDiscovery.getVMServiceUriForAttach(
'bar',
......@@ -463,7 +463,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(
portDiscovery.getVMServiceUriForAttach(
......@@ -494,7 +494,7 @@ void main() {
preliminaryMDnsClient: emptyClient,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(
portDiscovery.getVMServiceUriForAttach(
......@@ -516,7 +516,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(() async => portDiscovery.queryForLaunch(applicationId: 'app-id'), throwsAssertionError);
......@@ -529,7 +529,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.queryForLaunch(
......@@ -547,7 +547,7 @@ void main() {
mdnsClient: client,
logger: logger,
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Uri? uri = await portDiscovery.getVMServiceUriForLaunch(
......@@ -569,7 +569,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(
() async => portDiscovery.queryForLaunch(applicationId: 'app-id', deviceVmservicePort: 123),
......@@ -594,7 +594,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Uri? uri = await portDiscovery.getVMServiceUriForLaunch(
'bar',
......@@ -632,7 +632,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Uri? uri = await portDiscovery.getVMServiceUriForLaunch(
'bar',
......@@ -670,7 +670,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Uri? uri = await portDiscovery.getVMServiceUriForLaunch(
'bar',
......@@ -705,7 +705,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(
portDiscovery.getVMServiceUriForLaunch(
......@@ -738,7 +738,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final Uri? uri = await portDiscovery.getVMServiceUriForLaunch(
......@@ -768,7 +768,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(
portDiscovery.getVMServiceUriForLaunch(
......@@ -790,7 +790,7 @@ void main() {
),
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(portDiscovery.deviceNameMatchesTargetName('My phone', 'My-Phone.local'), isTrue);
......@@ -804,7 +804,7 @@ void main() {
),
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
expect(portDiscovery.deviceNameMatchesTargetName('My phone', 'My-Phone-2.local'), isFalse);
});
......@@ -834,7 +834,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.firstMatchingVmService(client);
expect(result?.domainName, 'srv-foo');
......@@ -865,7 +865,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.firstMatchingVmService(
client,
......@@ -895,7 +895,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.firstMatchingVmService(
client,
......@@ -933,7 +933,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.firstMatchingVmService(
client,
......@@ -971,7 +971,7 @@ void main() {
mdnsClient: client,
logger: BufferLogger.test(),
flutterUsage: TestUsage(),
analytics: NoOpAnalytics(),
analytics: const NoOpAnalytics(),
);
final MDnsVmServiceDiscoveryResult? result = await portDiscovery.firstMatchingVmService(
client,
......
......@@ -30,8 +30,7 @@ import 'package:flutter_tools/src/run_cold.dart';
import 'package:flutter_tools/src/run_hot.dart';
import 'package:flutter_tools/src/version.dart';
import 'package:flutter_tools/src/vmservice.dart';
// TODO(goderbauer): Fix this ignore when https://github.com/dart-lang/tools/issues/234 is resolved.
import 'package:unified_analytics/src/enums.dart' show DashEvent; // ignore: implementation_imports
import 'package:unified_analytics/testing.dart';
import 'package:unified_analytics/unified_analytics.dart';
import 'package:vm_service/vm_service.dart' as vm_service;
......
......@@ -26,7 +26,7 @@ void main() {
false,
'test-reason',
TestUsage(),
NoOpAnalytics(),
const NoOpAnalytics(),
);
});
}
......
......@@ -27,8 +27,7 @@ import 'package:flutter_tools/src/project.dart';
import 'package:flutter_tools/src/reporting/reporting.dart';
import 'package:flutter_tools/src/runner/flutter_command.dart';
import 'package:test/fake.dart';
// TODO(goderbauer): Fix this ignore when https://github.com/dart-lang/tools/issues/234 is resolved.
import 'package:unified_analytics/src/enums.dart' show DashEvent; // ignore: implementation_imports
import 'package:unified_analytics/testing.dart';
import 'package:unified_analytics/unified_analytics.dart';
import '../../src/common.dart';
......
......@@ -17,8 +17,7 @@ import 'package:meta/meta.dart';
import 'package:path/path.dart' as path; // flutter_ignore: package_path_import
import 'package:test/test.dart' as test_package show test;
import 'package:test/test.dart' hide test;
// TODO(goderbauer): Fix this ignore when https://github.com/dart-lang/tools/issues/234 is resolved.
import 'package:unified_analytics/src/enums.dart' show DevicePlatform; // ignore: implementation_imports
import 'package:unified_analytics/testing.dart';
import 'package:unified_analytics/unified_analytics.dart';
import 'fakes.dart';
......
......@@ -125,7 +125,7 @@ void testUsingContext(
CrashReporter: () => const NoopCrashReporter(),
TemplateRenderer: () => const MustacheTemplateRenderer(),
BuildTargets: () => const BuildTargetsImpl(),
Analytics: () => NoOpAnalytics(),
Analytics: () => const NoOpAnalytics(),
},
body: () {
// To catch all errors thrown by the test, even uncaught async errors, we use a zone.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment