diff --git a/.circleci/config.yml b/.circleci/config.yml index b0251026e30..ca9e62316f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,6 +38,12 @@ commands: command: | flutter pub global activate melos 1.3.0 melos bootstrap + activate_pana: + steps: + - run: + name: Install and set up pana + command: | + flutter pub global activate pana install_tuneup: steps: - run: @@ -63,6 +69,21 @@ jobs: name: Analyze Dart/Flutter Code command: melos run analyze --no-select + pub_analysis: + executor: docker-executor + parameters: + plugin_threshold: + type: string + description: the plugin name and the pub analysis threshold in the format : + steps: + - install_flutter + - checkout + - install_melos + - activate_pana + - run: + name: Run pub analysis and fail if the score is below the max score + command: param=<< parameters.plugin_threshold >> && plugin=${param%:*} && threshold=${param#*:} && melos exec -c 1 --fail-fast --scope="$plugin" -- pana --no-warning --exit-code-threshold $threshold . + unit_test_flutter: executor: docker-executor parameters: @@ -181,6 +202,20 @@ workflows: jobs: - format_flutter - analyze_flutter + - pub_analysis: + matrix: + parameters: + plugin_threshold: [ + # should be in format : + "amplify_analytics_pinpoint:10", + "amplify_api:10", + "amplify_auth_cognito:10", + "amplify_authenticator:0", + "amplify_core:10", + "amplify_datastore:20", + "amplify_flutter:20", + "amplify_storage_s3:10", + ] - unit_test_flutter: matrix: parameters: diff --git a/packages/amplify_authenticator/lib/src/services/amplify_auth_service.dart b/packages/amplify_authenticator/lib/src/services/amplify_auth_service.dart index ad4a58eb088..6ee69370a8b 100644 --- a/packages/amplify_authenticator/lib/src/services/amplify_auth_service.dart +++ b/packages/amplify_authenticator/lib/src/services/amplify_auth_service.dart @@ -18,7 +18,6 @@ import 'dart:async'; import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:collection/collection.dart'; -import 'package:collection/src/iterable_extensions.dart'; abstract class AuthService { Future signIn(String username, String password);