Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 <plugin_name>:<threshold>
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:
Expand Down Expand Up @@ -181,6 +202,20 @@ workflows:
jobs:
- format_flutter
- analyze_flutter
- pub_analysis:
matrix:
parameters:
plugin_threshold: [
# should be in format <plugin_name>:<threshold>
"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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this was needed to get the authenticator to a max pub score

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming it was superfluous and we had access to the extensions via collection.dart?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct


abstract class AuthService {
Future<SignInResult> signIn(String username, String password);
Expand Down