Skip to content

Commit

Permalink
[infra] Ignore analyzer issues in CI (flutter#2271)
Browse files Browse the repository at this point in the history
35e984f migrated some deprecated analyzer warnings to the newer
alternatives. These created some failures in unrelated plugins based on
the warnings being slightly different.

Added `ignore`s for now to turn CI green again as soon as possible. The
previous analysis options really should not be used and the majority of
the patch was unrelated, so I prefer ignoring specific already failing cases
to reverting in this case. Including an `analysis_options.yaml` file with
deprecated analyzer rules causes analyzer failures in the including package,
so that patch can't be landed in a way that prevents regressions
without updated rules.
  • Loading branch information
Michael Klimushyn authored and Park Sung Min committed Dec 17, 2019
1 parent eb40431 commit 6b9c69c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/android_alarm_manager/lib/android_alarm_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ void _alarmManagerCallbackDispatcher() {
exit(-1);
}

// ignore: inference_failure_on_function_return_type
if (closure is Function()) {
closure();
// ignore: inference_failure_on_function_return_type
} else if (closure is Function(int)) {
final int id = args[1];
closure(id);
Expand Down Expand Up @@ -182,6 +184,7 @@ class AndroidAlarmManager {
bool wakeup = false,
bool rescheduleOnReboot = false,
}) async {
// ignore: inference_failure_on_function_return_type
assert(callback is Function() || callback is Function(int));
assert(id.bitLength < 32);
final int startMillis = time.millisecondsSinceEpoch;
Expand Down Expand Up @@ -245,6 +248,7 @@ class AndroidAlarmManager {
bool wakeup = false,
bool rescheduleOnReboot = false,
}) async {
// ignore: inference_failure_on_function_return_type
assert(callback is Function() || callback is Function(int));
assert(id.bitLength < 32);
final int now = DateTime.now().millisecondsSinceEpoch;
Expand Down
1 change: 1 addition & 0 deletions packages/camera/lib/camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ enum ResolutionPreset {
max,
}

// ignore: inference_failure_on_function_return_type
typedef onLatestImageAvailable = Function(CameraImage image);

/// Returns the resolution preset as a String.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ class GooglePlayConnection
} on PlatformException catch (e) {
exception = e;
responses = [
// ignore: invalid_use_of_visible_for_testing_member
SkuDetailsResponseWrapper(
responseCode: BillingResponse.error, skuDetailsList: []),
// ignore: invalid_use_of_visible_for_testing_member
SkuDetailsResponseWrapper(
responseCode: BillingResponse.error, skuDetailsList: [])
];
Expand Down

0 comments on commit 6b9c69c

Please sign in to comment.