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 { ...@@ -435,7 +435,7 @@ class Environment {
processManager: processManager, processManager: processManager,
platform: platform ?? FakePlatform(), platform: platform ?? FakePlatform(),
usage: usage ?? TestUsage(), usage: usage ?? TestUsage(),
analytics: analytics ?? NoOpAnalytics(), analytics: analytics ?? const NoOpAnalytics(),
engineVersion: engineVersion, engineVersion: engineVersion,
generateDartPluginRegistry: generateDartPluginRegistry, generateDartPluginRegistry: generateDartPluginRegistry,
); );
......
...@@ -92,7 +92,7 @@ class XcodeProjectInterpreter { ...@@ -92,7 +92,7 @@ class XcodeProjectInterpreter {
logger: BufferLogger.test(), logger: BufferLogger.test(),
version: version, version: version,
build: build, build: build,
analytics: analytics ?? NoOpAnalytics(), analytics: analytics ?? const NoOpAnalytics(),
); );
} }
......
...@@ -39,7 +39,7 @@ Analytics getAnalytics({ ...@@ -39,7 +39,7 @@ Analytics getAnalytics({
runningOnBot || runningOnBot ||
// Ignore when suppressed by FLUTTER_SUPPRESS_ANALYTICS. // Ignore when suppressed by FLUTTER_SUPPRESS_ANALYTICS.
suppressEnvFlag) { suppressEnvFlag) {
return NoOpAnalytics(); return const NoOpAnalytics();
} }
// Providing an override of the [Analytics] instance is preferred when // Providing an override of the [Analytics] instance is preferred when
......
...@@ -51,7 +51,7 @@ dependencies: ...@@ -51,7 +51,7 @@ dependencies:
http_multi_server: 3.2.1 http_multi_server: 3.2.1
convert: 3.1.1 convert: 3.1.1
async: 2.11.0 async: 2.11.0
unified_analytics: 5.8.1 unified_analytics: 5.8.4
cli_config: 0.1.2 cli_config: 0.1.2
graphs: 2.3.1 graphs: 2.3.1
...@@ -119,4 +119,4 @@ dartdoc: ...@@ -119,4 +119,4 @@ dartdoc:
# Exclude this package from the hosted API docs. # Exclude this package from the hosted API docs.
nodoc: true nodoc: true
# PUBSPEC CHECKSUM: 588f # PUBSPEC CHECKSUM: c492
...@@ -157,7 +157,7 @@ void main() { ...@@ -157,7 +157,7 @@ void main() {
preliminaryMDnsClient: FakeMDnsClient(<PtrResourceRecord>[], <String, List<SrvResourceRecord>>{}), preliminaryMDnsClient: FakeMDnsClient(<PtrResourceRecord>[], <String, List<SrvResourceRecord>>{}),
logger: logger, logger: logger,
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
), ),
}); });
...@@ -221,7 +221,7 @@ void main() { ...@@ -221,7 +221,7 @@ void main() {
preliminaryMDnsClient: FakeMDnsClient(<PtrResourceRecord>[], <String, List<SrvResourceRecord>>{}), preliminaryMDnsClient: FakeMDnsClient(<PtrResourceRecord>[], <String, List<SrvResourceRecord>>{}),
logger: logger, logger: logger,
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
), ),
Signals: () => FakeSignals(), Signals: () => FakeSignals(),
}); });
...@@ -291,7 +291,7 @@ void main() { ...@@ -291,7 +291,7 @@ void main() {
preliminaryMDnsClient: FakeMDnsClient(<PtrResourceRecord>[], <String, List<SrvResourceRecord>>{}), preliminaryMDnsClient: FakeMDnsClient(<PtrResourceRecord>[], <String, List<SrvResourceRecord>>{}),
logger: logger, logger: logger,
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
), ),
ProcessManager: () => FakeProcessManager.empty(), ProcessManager: () => FakeProcessManager.empty(),
}); });
...@@ -361,7 +361,7 @@ void main() { ...@@ -361,7 +361,7 @@ void main() {
), ),
logger: logger, logger: logger,
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
), ),
}); });
...@@ -432,7 +432,7 @@ void main() { ...@@ -432,7 +432,7 @@ void main() {
), ),
logger: logger, logger: logger,
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
), ),
}); });
...@@ -507,7 +507,7 @@ void main() { ...@@ -507,7 +507,7 @@ void main() {
), ),
logger: logger, logger: logger,
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
), ),
}); });
...@@ -582,7 +582,7 @@ void main() { ...@@ -582,7 +582,7 @@ void main() {
), ),
logger: logger, logger: logger,
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
), ),
}); });
......
...@@ -67,7 +67,7 @@ void main() { ...@@ -67,7 +67,7 @@ void main() {
logger: logger, logger: logger,
appFilenamePattern: RegExp(r'lib.*app\.so'), appFilenamePattern: RegExp(r'lib.*app\.so'),
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
final Archive archive = Archive() final Archive archive = Archive()
...@@ -152,7 +152,7 @@ void main() { ...@@ -152,7 +152,7 @@ void main() {
logger: logger, logger: logger,
appFilenamePattern: RegExp(r'lib.*app\.so'), appFilenamePattern: RegExp(r'lib.*app\.so'),
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
final Archive archive = Archive() final Archive archive = Archive()
...@@ -195,7 +195,7 @@ void main() { ...@@ -195,7 +195,7 @@ void main() {
logger: logger, logger: logger,
appFilenamePattern: RegExp(r'lib.*app\.so'), appFilenamePattern: RegExp(r'lib.*app\.so'),
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
final Directory outputDirectory = fileSystem.directory('example/out/foo.app') final Directory outputDirectory = fileSystem.directory('example/out/foo.app')
...@@ -239,7 +239,7 @@ void main() { ...@@ -239,7 +239,7 @@ void main() {
logger: logger, logger: logger,
appFilenamePattern: RegExp(r'lib.*app\.so'), appFilenamePattern: RegExp(r'lib.*app\.so'),
flutterUsage: TestUsage(), flutterUsage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
final Directory outputDirectory = fileSystem.directory('example/out/foo.app')..createSync(recursive: true); final Directory outputDirectory = fileSystem.directory('example/out/foo.app')..createSync(recursive: true);
......
...@@ -73,7 +73,7 @@ void main() { ...@@ -73,7 +73,7 @@ void main() {
platform: platform, platform: platform,
processManager: fakeProcessManager, processManager: fakeProcessManager,
usage: TestUsage(), usage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
}); });
...@@ -186,7 +186,7 @@ void main() { ...@@ -186,7 +186,7 @@ void main() {
platform: platform, platform: platform,
processManager: fakeProcessManager, processManager: fakeProcessManager,
usage: TestUsage(), usage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
fileSystem.file(xcodebuild).deleteSync(); fileSystem.file(xcodebuild).deleteSync();
...@@ -513,7 +513,7 @@ void main() { ...@@ -513,7 +513,7 @@ void main() {
platform: platform, platform: platform,
processManager: fakeProcessManager, processManager: fakeProcessManager,
usage: TestUsage(), usage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
expect(await xcodeProjectInterpreter.getInfo(workingDirectory), isNotNull); expect(await xcodeProjectInterpreter.getInfo(workingDirectory), isNotNull);
...@@ -540,7 +540,7 @@ void main() { ...@@ -540,7 +540,7 @@ void main() {
platform: platform, platform: platform,
processManager: fakeProcessManager, processManager: fakeProcessManager,
usage: TestUsage(), usage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
expect(() => xcodeProjectInterpreter.getInfo(workingDirectory), throwsToolExit(message: stderr)); expect(() => xcodeProjectInterpreter.getInfo(workingDirectory), throwsToolExit(message: stderr));
...@@ -567,7 +567,7 @@ void main() { ...@@ -567,7 +567,7 @@ void main() {
platform: platform, platform: platform,
processManager: fakeProcessManager, processManager: fakeProcessManager,
usage: TestUsage(), usage: TestUsage(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
expect(() => xcodeProjectInterpreter.getInfo(workingDirectory), throwsToolExit(message: stderr)); expect(() => xcodeProjectInterpreter.getInfo(workingDirectory), throwsToolExit(message: stderr));
......
...@@ -517,7 +517,7 @@ void main() { ...@@ -517,7 +517,7 @@ void main() {
fileSystem: fileSystem, fileSystem: fileSystem,
coreDeviceControl: FakeIOSCoreDeviceControl(), coreDeviceControl: FakeIOSCoreDeviceControl(),
xcodeDebug: FakeXcodeDebug(), xcodeDebug: FakeXcodeDebug(),
analytics: NoOpAnalytics(), analytics: const NoOpAnalytics(),
); );
}); });
......
...@@ -30,8 +30,7 @@ import 'package:flutter_tools/src/run_cold.dart'; ...@@ -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/run_hot.dart';
import 'package:flutter_tools/src/version.dart'; import 'package:flutter_tools/src/version.dart';
import 'package:flutter_tools/src/vmservice.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/testing.dart';
import 'package:unified_analytics/src/enums.dart' show DashEvent; // ignore: implementation_imports
import 'package:unified_analytics/unified_analytics.dart'; import 'package:unified_analytics/unified_analytics.dart';
import 'package:vm_service/vm_service.dart' as vm_service; import 'package:vm_service/vm_service.dart' as vm_service;
......
...@@ -26,7 +26,7 @@ void main() { ...@@ -26,7 +26,7 @@ void main() {
false, false,
'test-reason', 'test-reason',
TestUsage(), TestUsage(),
NoOpAnalytics(), const NoOpAnalytics(),
); );
}); });
} }
......
...@@ -27,8 +27,7 @@ import 'package:flutter_tools/src/project.dart'; ...@@ -27,8 +27,7 @@ import 'package:flutter_tools/src/project.dart';
import 'package:flutter_tools/src/reporting/reporting.dart'; import 'package:flutter_tools/src/reporting/reporting.dart';
import 'package:flutter_tools/src/runner/flutter_command.dart'; import 'package:flutter_tools/src/runner/flutter_command.dart';
import 'package:test/fake.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/testing.dart';
import 'package:unified_analytics/src/enums.dart' show DashEvent; // ignore: implementation_imports
import 'package:unified_analytics/unified_analytics.dart'; import 'package:unified_analytics/unified_analytics.dart';
import '../../src/common.dart'; import '../../src/common.dart';
......
...@@ -17,8 +17,7 @@ import 'package:meta/meta.dart'; ...@@ -17,8 +17,7 @@ import 'package:meta/meta.dart';
import 'package:path/path.dart' as path; // flutter_ignore: package_path_import 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' as test_package show test;
import 'package:test/test.dart' hide 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/testing.dart';
import 'package:unified_analytics/src/enums.dart' show DevicePlatform; // ignore: implementation_imports
import 'package:unified_analytics/unified_analytics.dart'; import 'package:unified_analytics/unified_analytics.dart';
import 'fakes.dart'; import 'fakes.dart';
......
...@@ -125,7 +125,7 @@ void testUsingContext( ...@@ -125,7 +125,7 @@ void testUsingContext(
CrashReporter: () => const NoopCrashReporter(), CrashReporter: () => const NoopCrashReporter(),
TemplateRenderer: () => const MustacheTemplateRenderer(), TemplateRenderer: () => const MustacheTemplateRenderer(),
BuildTargets: () => const BuildTargetsImpl(), BuildTargets: () => const BuildTargetsImpl(),
Analytics: () => NoOpAnalytics(), Analytics: () => const NoOpAnalytics(),
}, },
body: () { body: () {
// To catch all errors thrown by the test, even uncaught async errors, we use a zone. // 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