refactor stream_flutter_workflow.yml
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
BRANCH=$1
|
|
||||||
|
|
||||||
if [ "$BRANCH" == "dev" ]
|
|
||||||
then
|
|
||||||
# TODO Flutter dev branch is currently broken so we're unable to test MacOS.
|
|
||||||
echo "TODO: Skipping macOS testing due to Flutter dev branch issue. Switching branch to stable."
|
|
||||||
BRANCH=stable
|
|
||||||
fi
|
|
||||||
|
|
||||||
git clone https://github.com/flutter/flutter.git --depth 1 -b $BRANCH _flutter
|
|
||||||
echo "::add-path::$GITHUB_WORKSPACE/_flutter/bin"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
flutter pub global activate melos
|
|
||||||
echo "::add-path::$HOME/.pub-cache/bin"
|
|
||||||
echo "::add-path::$GITHUB_WORKSPACE/_flutter/.pub-cache/bin"
|
|
||||||
echo "::add-path::$GITHUB_WORKSPACE/_flutter/bin/cache/dart-sdk/bin"
|
|
||||||
Executable → Regular
+1
@@ -3,4 +3,5 @@
|
|||||||
# Fast fail the script on failures.
|
# Fast fail the script on failures.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
pub global activate remove_from_coverage
|
||||||
pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$' -r '\.freezed\.dart$'
|
pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$' -r '\.freezed\.dart$'
|
||||||
@@ -17,89 +17,124 @@ jobs:
|
|||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: "Git Checkout"
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: 'Install Flutter'
|
- name: "Install Flutter"
|
||||||
run: ./.github/workflows/scripts/install-flutter.sh stable
|
uses: subosito/flutter-action@v1
|
||||||
- name: 'Install Tools'
|
with:
|
||||||
|
channel: 'stable'
|
||||||
|
- name: "Install Tools"
|
||||||
run: |
|
run: |
|
||||||
./.github/workflows/scripts/install-tools.sh
|
flutter pub global activate melos
|
||||||
flutter pub global activate tuneup
|
flutter pub global activate tuneup
|
||||||
- name: 'Bootstrap Workspace'
|
- name: "Bootstrap Workspace"
|
||||||
run: melos bootstrap --verbose
|
run: melos bootstrap
|
||||||
- name: 'Dart Analyze'
|
- name: "Dart Analyze"
|
||||||
run: |
|
run: |
|
||||||
melos exec -c 3 --ignore="*example*" -- \
|
melos run analyze
|
||||||
tuneup check
|
- name: "Pub Check"
|
||||||
- name: 'Pub Check'
|
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: |
|
||||||
melos exec -c 1 --no-private --ignore="*example*" -- \
|
melos run lint:pub
|
||||||
pub publish --dry-run
|
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: "Git Checkout"
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: 'Install Flutter'
|
- name: "Install Flutter"
|
||||||
run: ./.github/workflows/scripts/install-flutter.sh stable
|
uses: subosito/flutter-action@v1
|
||||||
- name: 'Install Tools'
|
with:
|
||||||
|
channel: 'stable'
|
||||||
|
- name: "Install Tools"
|
||||||
|
run: flutter pub global activate melos
|
||||||
|
- name: "Bootstrap Workspace"
|
||||||
|
run: melos bootstrap
|
||||||
|
- name: "Melos Format"
|
||||||
|
run: melos run format
|
||||||
|
- name: "Validate Formatting"
|
||||||
run: |
|
run: |
|
||||||
./.github/workflows/scripts/install-tools.sh
|
|
||||||
- name: 'Bootstrap Workspace'
|
|
||||||
run: melos bootstrap --verbose
|
|
||||||
- name: 'Dart'
|
|
||||||
run: |
|
|
||||||
melos exec -c 1 -- \
|
|
||||||
flutter format .
|
|
||||||
./.github/workflows/scripts/validate-formatting.sh
|
./.github/workflows/scripts/validate-formatting.sh
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: "Git Checkout"
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: 'Install Flutter'
|
- name: "Install Flutter"
|
||||||
run: ./.github/workflows/scripts/install-flutter.sh stable
|
uses: subosito/flutter-action@v1
|
||||||
- name: 'Install Tools'
|
with:
|
||||||
run: |
|
channel: 'stable'
|
||||||
./.github/workflows/scripts/install-tools.sh
|
- name: "Install Tools"
|
||||||
flutter pub global activate coverage
|
run: flutter pub global activate melos
|
||||||
flutter pub global activate remove_from_coverage
|
- name: "Bootstrap Workspace"
|
||||||
- name: 'Bootstrap Workspace'
|
run: melos bootstrap
|
||||||
run: melos bootstrap --verbose
|
- name: "Flutter Test"
|
||||||
- name: 'Dart Test'
|
run: melos run test:all
|
||||||
run: |
|
- name: "Collect Coverage"
|
||||||
cd packages/stream_chat
|
run: melos run coverage:ignore-file
|
||||||
flutter pub run test --coverage coverage/
|
- name: "Upload Coverage"
|
||||||
format_coverage --lcov --in=coverage/ --out=coverage/lcov.info --packages=.packages --report-on=lib
|
uses: codecov/codecov-action@v1
|
||||||
- name: 'Flutter Test'
|
with:
|
||||||
run: |
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
melos exec -c 3 --flutter --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
|
files: packages/*/coverage/lcov.info
|
||||||
flutter test --coverage
|
- name: "Stream Chat Coverage Check"
|
||||||
- name: CodeCov
|
uses: VeryGoodOpenSource/[email protected]
|
||||||
run: |
|
|
||||||
melos exec -c 3 --fail-fast --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
|
|
||||||
"\$MELOS_ROOT_PATH/.github/workflows/scripts/coverage.sh"
|
|
||||||
bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
- uses: VeryGoodOpenSource/[email protected]
|
|
||||||
with:
|
with:
|
||||||
path: packages/stream_chat/coverage/lcov.info
|
path: packages/stream_chat/coverage/lcov.info
|
||||||
min_coverage: 40
|
min_coverage: 40
|
||||||
|
- name: "Stream Chat Persistence Coverage Check"
|
||||||
- uses: VeryGoodOpenSource/[email protected]
|
- uses: VeryGoodOpenSource/[email protected]
|
||||||
with:
|
with:
|
||||||
path: packages/stream_chat_persistence/coverage/lcov.info
|
path: packages/stream_chat_persistence/coverage/lcov.info
|
||||||
min_coverage: 95
|
min_coverage: 95
|
||||||
- uses: VeryGoodOpenSource/[email protected]
|
- name: "Stream Chat Flutter Core Coverage Check"
|
||||||
|
uses: VeryGoodOpenSource/[email protected]
|
||||||
with:
|
with:
|
||||||
path: packages/stream_chat_flutter_core/coverage/lcov.info
|
path: packages/stream_chat_flutter_core/coverage/lcov.info
|
||||||
min_coverage: 90
|
min_coverage: 90
|
||||||
- uses: VeryGoodOpenSource/[email protected]
|
- name: "Stream Chat Flutter Coverage Check"
|
||||||
|
uses: VeryGoodOpenSource/[email protected]
|
||||||
with:
|
with:
|
||||||
path: packages/stream_chat_flutter/coverage/lcov.info
|
path: packages/stream_chat_flutter/coverage/lcov.info
|
||||||
min_coverage: 35
|
min_coverage: 35
|
||||||
|
|
||||||
|
# test:
|
||||||
|
# runs-on: macos-latest
|
||||||
|
# timeout-minutes: 15
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v2
|
||||||
|
# with:
|
||||||
|
# fetch-depth: 0
|
||||||
|
# - name: 'Install Flutter'
|
||||||
|
# run: ./.github/workflows/scripts/install-flutter.sh stable
|
||||||
|
# - name: 'Install Tools'
|
||||||
|
# run: |
|
||||||
|
# ./.github/workflows/scripts/install-tools.sh
|
||||||
|
# flutter pub global activate coverage
|
||||||
|
# flutter pub global activate remove_from_coverage
|
||||||
|
# - name: 'Bootstrap Workspace'
|
||||||
|
# run: melos bootstrap --verbose
|
||||||
|
# - name: 'Dart Test'
|
||||||
|
# run: |
|
||||||
|
# cd packages/stream_chat
|
||||||
|
# flutter pub run test --coverage coverage/
|
||||||
|
# format_coverage --lcov --in=coverage/ --out=coverage/lcov.info --packages=.packages --report-on=lib
|
||||||
|
# - name: 'Flutter Test'
|
||||||
|
# run: |
|
||||||
|
# melos exec -c 3 --flutter --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
|
||||||
|
# flutter test --coverage
|
||||||
|
# - name: CodeCov
|
||||||
|
# run: |
|
||||||
|
# melos exec -c 3 --fail-fast --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
|
||||||
|
# "\$MELOS_ROOT_PATH/.github/workflows/scripts/coverage.sh"
|
||||||
|
# bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
+54
-42
@@ -1,4 +1,4 @@
|
|||||||
name: stream_chat_dart
|
name: stream_chat_flutter
|
||||||
|
|
||||||
versioning:
|
versioning:
|
||||||
mode: independent
|
mode: independent
|
||||||
@@ -7,56 +7,68 @@ packages:
|
|||||||
- packages/**
|
- packages/**
|
||||||
|
|
||||||
scripts:
|
scripts:
|
||||||
|
lint:all:
|
||||||
|
run: melos run analyze && melos run format
|
||||||
|
description: Run all static analysis checks
|
||||||
|
|
||||||
# - Requires `pub global activate tuneup`.
|
analyze:
|
||||||
analyze: >
|
run: |
|
||||||
melos exec -c 1 --fail-fast -- \
|
melos exec -c 4 --ignore="*example*" -- \
|
||||||
pub global run tuneup check
|
dart analyze --fatal-infos .
|
||||||
|
description: |
|
||||||
|
Run `dart analyze` in all packages.
|
||||||
|
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
|
||||||
|
|
||||||
format: pub global run flutter_plugin_tools format
|
format:
|
||||||
|
run: flutter format --set-exit-if-changed .
|
||||||
|
description: |
|
||||||
|
Run `flutter format --set-exit-if-changed .` in all packages.
|
||||||
|
|
||||||
|
lint:pub:
|
||||||
|
run: |
|
||||||
|
melos exec -c 4 --no-private --ignore="*example*" -- \
|
||||||
|
pub publish --dry-run
|
||||||
|
description: |
|
||||||
|
Run `pub publish --dry-run` in all packages.
|
||||||
|
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
|
||||||
|
|
||||||
build:examples:ios: >
|
generate:all:
|
||||||
melos exec -c 1 --scope="*example*" --fail-fast -- \
|
run: melos run generate:dart && melos run generate:flutter
|
||||||
flutter build ios --no-codesign
|
description: Build all generated files for Dart & Flutter packages in this project.
|
||||||
|
|
||||||
|
generate:dart:
|
||||||
|
run: melos exec -c 1 --depends-on="build_runner" --no-flutter -- "dart run build_runner build --delete-conflicting-outputs"
|
||||||
|
description: Build all generated files for Dart packages in this project.
|
||||||
|
|
||||||
build:examples:android: >
|
generate:flutter:
|
||||||
melos exec -c 1 --scope="*example*" --fail-fast -- \
|
run: melos exec -c 1 --depends-on="build_runner" --flutter -- "flutter pub run build_runner build --delete-conflicting-outputs"
|
||||||
flutter build apk
|
description: Build all generated files for Flutter packages in this project.
|
||||||
|
|
||||||
# Build any plugin example apps that have MacOS support.
|
test:all:
|
||||||
# - Requires `flutter config --enable-macos-desktop` enabled.
|
run: melos run test:dart --no-select && melos run test:flutter --no-select
|
||||||
# - Requires `flutter channel master && flutter upgrade`.
|
description: Run all Dart & Flutter tests in this project.
|
||||||
build:examples:macos: >
|
|
||||||
melos exec -c 1 --scope="*example*" --dir-exists=macos --fail-fast -- \
|
|
||||||
flutter build macos
|
|
||||||
|
|
||||||
|
test:dart:
|
||||||
|
run: melos exec -c 1 --fail-fast -- "flutter test --coverage"
|
||||||
|
description: Run Dart tests for a specific package in this project.
|
||||||
|
select-package:
|
||||||
|
flutter: false
|
||||||
|
dir-exists: test
|
||||||
|
|
||||||
test:dart: >
|
test:flutter:
|
||||||
melos exec -c 1 --fail-fast --no-flutter --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
|
run: melos exec -c 1 --fail-fast -- "flutter test --coverage"
|
||||||
flutter pub run test
|
description: Run Flutter tests for a specific package in this project.
|
||||||
|
select-package:
|
||||||
|
flutter: true
|
||||||
|
dir-exists: test
|
||||||
|
|
||||||
test:flutter: >
|
coverage:ignore-file:
|
||||||
melos exec -c 1 --fail-fast --flutter --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
|
run: |
|
||||||
flutter test
|
melos exec -c 4 --fail-fast -- "\$MELOS_ROOT_PATH/.github/workflows/scripts/remove-from_coverage.sh"
|
||||||
|
description: Removes all the ignored files from the coverage report.
|
||||||
test:web: >
|
select-package:
|
||||||
melos exec -c 1 --fail-fast --dir-exists=test --scope="*web*" -- \
|
dir-exists: coverage
|
||||||
flutter test --platform=chrome
|
|
||||||
|
|
||||||
|
|
||||||
lint:pub: >
|
|
||||||
melos exec -c 5 --fail-fast --no-private --ignore="*example*" -- \
|
|
||||||
pub publish --dry-run
|
|
||||||
|
|
||||||
|
|
||||||
postclean: >
|
|
||||||
melos exec -- \
|
|
||||||
rm -rf ./build ./android/.gradle ./ios/.symlinks ./ios/Pods ./android/.idea ./.idea ./.dart-tool/build
|
|
||||||
|
|
||||||
dev_dependencies:
|
|
||||||
pedantic: 1.9.2
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0 <3.0.0"
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
flutter: '>=1.22.4 <2.0.0'
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Configuration for https://pub.dev/packages/peanut
|
|
||||||
directories:
|
|
||||||
- example/web
|
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
analyzer:
|
|
||||||
enable-experiment:
|
|
||||||
- extension-methods
|
|
||||||
exclude:
|
|
||||||
- lib/**/*.g.dart
|
|
||||||
- example/**
|
|
||||||
- lib/src/emoji
|
|
||||||
- lib/**/*.freezed.dart
|
|
||||||
- test/**
|
|
||||||
|
|
||||||
linter:
|
|
||||||
rules:
|
|
||||||
# these rules are documented on and in the same order as
|
|
||||||
# the Dart Lint rules page to make maintenance easier
|
|
||||||
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
|
|
||||||
- always_use_package_imports
|
|
||||||
- avoid_empty_else
|
|
||||||
- avoid_relative_lib_imports
|
|
||||||
- avoid_slow_async_io
|
|
||||||
- avoid_types_as_parameter_names
|
|
||||||
- cancel_subscriptions
|
|
||||||
- close_sinks
|
|
||||||
- control_flow_in_finally
|
|
||||||
- empty_statements
|
|
||||||
- hash_and_equals
|
|
||||||
- invariant_booleans
|
|
||||||
- iterable_contains_unrelated_type
|
|
||||||
- list_remove_unrelated_type
|
|
||||||
- literal_only_boolean_expressions
|
|
||||||
- no_adjacent_strings_in_list
|
|
||||||
- no_duplicate_case_values
|
|
||||||
- no_logic_in_create_state
|
|
||||||
- prefer_void_to_null
|
|
||||||
- test_types_in_equals
|
|
||||||
- throw_in_finally
|
|
||||||
- unnecessary_statements
|
|
||||||
- unrelated_type_equality_checks
|
|
||||||
- omit_local_variable_types
|
|
||||||
- use_key_in_widget_constructors
|
|
||||||
- valid_regexps
|
|
||||||
- always_declare_return_types
|
|
||||||
- always_require_non_null_named_parameters
|
|
||||||
- annotate_overrides
|
|
||||||
- avoid_bool_literals_in_conditional_expressions
|
|
||||||
- avoid_catching_errors
|
|
||||||
- avoid_init_to_null
|
|
||||||
- avoid_null_checks_in_equality_operators
|
|
||||||
- avoid_positional_boolean_parameters
|
|
||||||
- avoid_private_typedef_functions
|
|
||||||
- avoid_redundant_argument_values
|
|
||||||
- avoid_return_types_on_setters
|
|
||||||
- avoid_returning_null_for_void
|
|
||||||
- avoid_shadowing_type_parameters
|
|
||||||
- avoid_single_cascade_in_expression_statements
|
|
||||||
- avoid_unnecessary_containers
|
|
||||||
- avoid_unused_constructor_parameters
|
|
||||||
- await_only_futures
|
|
||||||
- camel_case_extensions
|
|
||||||
- camel_case_types
|
|
||||||
- cascade_invocations
|
|
||||||
|
|
||||||
- constant_identifier_names
|
|
||||||
- curly_braces_in_flow_control_structures
|
|
||||||
- directives_ordering
|
|
||||||
- empty_catches
|
|
||||||
- empty_constructor_bodies
|
|
||||||
- exhaustive_cases
|
|
||||||
- file_names
|
|
||||||
- implementation_imports
|
|
||||||
- join_return_with_assignment
|
|
||||||
- leading_newlines_in_multiline_strings
|
|
||||||
- library_names
|
|
||||||
- library_prefixes
|
|
||||||
- lines_longer_than_80_chars
|
|
||||||
- missing_whitespace_between_adjacent_strings
|
|
||||||
- non_constant_identifier_names
|
|
||||||
- null_closures
|
|
||||||
- one_member_abstracts
|
|
||||||
- only_throw_errors
|
|
||||||
- package_api_docs
|
|
||||||
- package_prefixed_library_names
|
|
||||||
- parameter_assignments
|
|
||||||
- prefer_adjacent_string_concatenation
|
|
||||||
- prefer_asserts_in_initializer_lists
|
|
||||||
- prefer_asserts_with_message
|
|
||||||
- prefer_collection_literals
|
|
||||||
- prefer_conditional_assignment
|
|
||||||
- prefer_const_constructors
|
|
||||||
- prefer_const_constructors_in_immutables
|
|
||||||
- prefer_const_declarations
|
|
||||||
- prefer_const_literals_to_create_immutables
|
|
||||||
- prefer_constructors_over_static_methods
|
|
||||||
- prefer_contains
|
|
||||||
- prefer_equal_for_default_values
|
|
||||||
- prefer_expression_function_bodies
|
|
||||||
- prefer_final_fields
|
|
||||||
- prefer_final_in_for_each
|
|
||||||
- prefer_final_locals
|
|
||||||
- prefer_function_declarations_over_variables
|
|
||||||
- prefer_generic_function_type_aliases
|
|
||||||
- prefer_if_elements_to_conditional_expressions
|
|
||||||
- prefer_if_null_operators
|
|
||||||
- prefer_initializing_formals
|
|
||||||
- prefer_inlined_adds
|
|
||||||
- prefer_int_literals
|
|
||||||
- prefer_interpolation_to_compose_strings
|
|
||||||
- prefer_is_empty
|
|
||||||
- prefer_is_not_empty
|
|
||||||
- prefer_is_not_operator
|
|
||||||
- prefer_null_aware_operators
|
|
||||||
- prefer_single_quotes
|
|
||||||
- prefer_spread_collections
|
|
||||||
- prefer_typing_uninitialized_variables
|
|
||||||
- provide_deprecation_message
|
|
||||||
- public_member_api_docs
|
|
||||||
- recursive_getters
|
|
||||||
- sized_box_for_whitespace
|
|
||||||
- slash_for_doc_comments
|
|
||||||
- sort_child_properties_last
|
|
||||||
- sort_constructors_first
|
|
||||||
- sort_unnamed_constructors_first
|
|
||||||
|
|
||||||
- type_annotate_public_apis
|
|
||||||
- type_init_formals
|
|
||||||
- unnecessary_await_in_return
|
|
||||||
- unnecessary_brace_in_string_interps
|
|
||||||
- unnecessary_const
|
|
||||||
- unnecessary_getters_setters
|
|
||||||
- unnecessary_lambdas
|
|
||||||
- unnecessary_new
|
|
||||||
- unnecessary_null_aware_assignments
|
|
||||||
- unnecessary_null_in_if_null_operators
|
|
||||||
- unnecessary_nullable_for_final_variable_declarations
|
|
||||||
- unnecessary_parenthesis
|
|
||||||
- unnecessary_raw_strings
|
|
||||||
- unnecessary_string_escapes
|
|
||||||
- unnecessary_string_interpolations
|
|
||||||
- unnecessary_this
|
|
||||||
- use_is_even_rather_than_modulo
|
|
||||||
- use_late_for_private_fields_and_variables
|
|
||||||
- use_rethrow_when_possible
|
|
||||||
- use_setters_to_change_properties
|
|
||||||
- use_to_and_as_if_applicable
|
|
||||||
- package_names
|
|
||||||
- sort_pub_dependencies
|
|
||||||
|
|
||||||
- cast_nullable_to_non_nullable
|
|
||||||
- unnecessary_null_checks
|
|
||||||
- tighten_type_of_initializing_formals
|
|
||||||
- null_check_on_nullable_type_parameter
|
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
analyzer:
|
|
||||||
enable-experiment:
|
|
||||||
- extension-methods
|
|
||||||
exclude:
|
|
||||||
- lib/**/*.g.dart
|
|
||||||
- example/**
|
|
||||||
- lib/src/emoji
|
|
||||||
- lib/**/*.freezed.dart
|
|
||||||
- test/**
|
|
||||||
|
|
||||||
linter:
|
|
||||||
rules:
|
|
||||||
# these rules are documented on and in the same order as
|
|
||||||
# the Dart Lint rules page to make maintenance easier
|
|
||||||
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
|
|
||||||
- always_use_package_imports
|
|
||||||
- avoid_empty_else
|
|
||||||
- avoid_relative_lib_imports
|
|
||||||
- avoid_slow_async_io
|
|
||||||
- avoid_types_as_parameter_names
|
|
||||||
- cancel_subscriptions
|
|
||||||
- close_sinks
|
|
||||||
- control_flow_in_finally
|
|
||||||
- empty_statements
|
|
||||||
- hash_and_equals
|
|
||||||
- invariant_booleans
|
|
||||||
- iterable_contains_unrelated_type
|
|
||||||
- list_remove_unrelated_type
|
|
||||||
- literal_only_boolean_expressions
|
|
||||||
- no_adjacent_strings_in_list
|
|
||||||
- no_duplicate_case_values
|
|
||||||
- no_logic_in_create_state
|
|
||||||
- prefer_void_to_null
|
|
||||||
- test_types_in_equals
|
|
||||||
- throw_in_finally
|
|
||||||
- unnecessary_statements
|
|
||||||
- unrelated_type_equality_checks
|
|
||||||
- omit_local_variable_types
|
|
||||||
- use_key_in_widget_constructors
|
|
||||||
- valid_regexps
|
|
||||||
- always_declare_return_types
|
|
||||||
- always_require_non_null_named_parameters
|
|
||||||
- annotate_overrides
|
|
||||||
- avoid_bool_literals_in_conditional_expressions
|
|
||||||
- avoid_catching_errors
|
|
||||||
- avoid_init_to_null
|
|
||||||
- avoid_null_checks_in_equality_operators
|
|
||||||
- avoid_positional_boolean_parameters
|
|
||||||
- avoid_private_typedef_functions
|
|
||||||
- avoid_redundant_argument_values
|
|
||||||
- avoid_return_types_on_setters
|
|
||||||
- avoid_returning_null_for_void
|
|
||||||
- avoid_shadowing_type_parameters
|
|
||||||
- avoid_single_cascade_in_expression_statements
|
|
||||||
- avoid_unnecessary_containers
|
|
||||||
- avoid_unused_constructor_parameters
|
|
||||||
- await_only_futures
|
|
||||||
- camel_case_extensions
|
|
||||||
- camel_case_types
|
|
||||||
- cascade_invocations
|
|
||||||
|
|
||||||
- constant_identifier_names
|
|
||||||
- curly_braces_in_flow_control_structures
|
|
||||||
- directives_ordering
|
|
||||||
- empty_catches
|
|
||||||
- empty_constructor_bodies
|
|
||||||
- exhaustive_cases
|
|
||||||
- file_names
|
|
||||||
- implementation_imports
|
|
||||||
- join_return_with_assignment
|
|
||||||
- leading_newlines_in_multiline_strings
|
|
||||||
- library_names
|
|
||||||
- library_prefixes
|
|
||||||
- lines_longer_than_80_chars
|
|
||||||
- missing_whitespace_between_adjacent_strings
|
|
||||||
- non_constant_identifier_names
|
|
||||||
- null_closures
|
|
||||||
- one_member_abstracts
|
|
||||||
- only_throw_errors
|
|
||||||
- package_api_docs
|
|
||||||
- package_prefixed_library_names
|
|
||||||
- parameter_assignments
|
|
||||||
- prefer_adjacent_string_concatenation
|
|
||||||
- prefer_asserts_in_initializer_lists
|
|
||||||
- prefer_asserts_with_message
|
|
||||||
- prefer_collection_literals
|
|
||||||
- prefer_conditional_assignment
|
|
||||||
- prefer_const_constructors
|
|
||||||
- prefer_const_constructors_in_immutables
|
|
||||||
- prefer_const_declarations
|
|
||||||
- prefer_const_literals_to_create_immutables
|
|
||||||
- prefer_constructors_over_static_methods
|
|
||||||
- prefer_contains
|
|
||||||
- prefer_equal_for_default_values
|
|
||||||
- prefer_expression_function_bodies
|
|
||||||
- prefer_final_fields
|
|
||||||
- prefer_final_in_for_each
|
|
||||||
- prefer_final_locals
|
|
||||||
- prefer_function_declarations_over_variables
|
|
||||||
- prefer_generic_function_type_aliases
|
|
||||||
- prefer_if_elements_to_conditional_expressions
|
|
||||||
- prefer_if_null_operators
|
|
||||||
- prefer_initializing_formals
|
|
||||||
- prefer_inlined_adds
|
|
||||||
- prefer_int_literals
|
|
||||||
- prefer_interpolation_to_compose_strings
|
|
||||||
- prefer_is_empty
|
|
||||||
- prefer_is_not_empty
|
|
||||||
- prefer_is_not_operator
|
|
||||||
- prefer_null_aware_operators
|
|
||||||
- prefer_single_quotes
|
|
||||||
- prefer_spread_collections
|
|
||||||
- prefer_typing_uninitialized_variables
|
|
||||||
- provide_deprecation_message
|
|
||||||
- public_member_api_docs
|
|
||||||
- recursive_getters
|
|
||||||
- sized_box_for_whitespace
|
|
||||||
- slash_for_doc_comments
|
|
||||||
- sort_child_properties_last
|
|
||||||
- sort_constructors_first
|
|
||||||
- sort_unnamed_constructors_first
|
|
||||||
|
|
||||||
- type_annotate_public_apis
|
|
||||||
- type_init_formals
|
|
||||||
- unnecessary_await_in_return
|
|
||||||
- unnecessary_brace_in_string_interps
|
|
||||||
- unnecessary_const
|
|
||||||
- unnecessary_getters_setters
|
|
||||||
- unnecessary_lambdas
|
|
||||||
- unnecessary_new
|
|
||||||
- unnecessary_null_aware_assignments
|
|
||||||
- unnecessary_null_in_if_null_operators
|
|
||||||
- unnecessary_nullable_for_final_variable_declarations
|
|
||||||
- unnecessary_parenthesis
|
|
||||||
- unnecessary_raw_strings
|
|
||||||
- unnecessary_string_escapes
|
|
||||||
- unnecessary_string_interpolations
|
|
||||||
- unnecessary_this
|
|
||||||
- use_is_even_rather_than_modulo
|
|
||||||
- use_late_for_private_fields_and_variables
|
|
||||||
- use_rethrow_when_possible
|
|
||||||
- use_setters_to_change_properties
|
|
||||||
- use_to_and_as_if_applicable
|
|
||||||
- package_names
|
|
||||||
- sort_pub_dependencies
|
|
||||||
|
|
||||||
- cast_nullable_to_non_nullable
|
|
||||||
- unnecessary_null_checks
|
|
||||||
- tighten_type_of_initializing_formals
|
|
||||||
- null_check_on_nullable_type_parameter
|
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
analyzer:
|
|
||||||
enable-experiment:
|
|
||||||
- extension-methods
|
|
||||||
exclude:
|
|
||||||
- lib/**/*.g.dart
|
|
||||||
- example/**
|
|
||||||
- lib/src/emoji
|
|
||||||
- lib/**/*.freezed.dart
|
|
||||||
- test/**
|
|
||||||
|
|
||||||
linter:
|
|
||||||
rules:
|
|
||||||
# these rules are documented on and in the same order as
|
|
||||||
# the Dart Lint rules page to make maintenance easier
|
|
||||||
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
|
|
||||||
- always_use_package_imports
|
|
||||||
- avoid_empty_else
|
|
||||||
- avoid_relative_lib_imports
|
|
||||||
- avoid_slow_async_io
|
|
||||||
- avoid_types_as_parameter_names
|
|
||||||
- cancel_subscriptions
|
|
||||||
- close_sinks
|
|
||||||
- control_flow_in_finally
|
|
||||||
- empty_statements
|
|
||||||
- hash_and_equals
|
|
||||||
- invariant_booleans
|
|
||||||
- iterable_contains_unrelated_type
|
|
||||||
- list_remove_unrelated_type
|
|
||||||
- literal_only_boolean_expressions
|
|
||||||
- no_adjacent_strings_in_list
|
|
||||||
- no_duplicate_case_values
|
|
||||||
- no_logic_in_create_state
|
|
||||||
- prefer_void_to_null
|
|
||||||
- test_types_in_equals
|
|
||||||
- throw_in_finally
|
|
||||||
- unnecessary_statements
|
|
||||||
- unrelated_type_equality_checks
|
|
||||||
- omit_local_variable_types
|
|
||||||
- use_key_in_widget_constructors
|
|
||||||
- valid_regexps
|
|
||||||
- always_declare_return_types
|
|
||||||
- always_require_non_null_named_parameters
|
|
||||||
- annotate_overrides
|
|
||||||
- avoid_bool_literals_in_conditional_expressions
|
|
||||||
- avoid_catching_errors
|
|
||||||
- avoid_init_to_null
|
|
||||||
- avoid_null_checks_in_equality_operators
|
|
||||||
- avoid_positional_boolean_parameters
|
|
||||||
- avoid_private_typedef_functions
|
|
||||||
- avoid_redundant_argument_values
|
|
||||||
- avoid_return_types_on_setters
|
|
||||||
- avoid_returning_null_for_void
|
|
||||||
- avoid_shadowing_type_parameters
|
|
||||||
- avoid_single_cascade_in_expression_statements
|
|
||||||
- avoid_unnecessary_containers
|
|
||||||
- avoid_unused_constructor_parameters
|
|
||||||
- await_only_futures
|
|
||||||
- camel_case_extensions
|
|
||||||
- camel_case_types
|
|
||||||
- cascade_invocations
|
|
||||||
|
|
||||||
- constant_identifier_names
|
|
||||||
- curly_braces_in_flow_control_structures
|
|
||||||
- directives_ordering
|
|
||||||
- empty_catches
|
|
||||||
- empty_constructor_bodies
|
|
||||||
- exhaustive_cases
|
|
||||||
- file_names
|
|
||||||
- implementation_imports
|
|
||||||
- join_return_with_assignment
|
|
||||||
- leading_newlines_in_multiline_strings
|
|
||||||
- library_names
|
|
||||||
- library_prefixes
|
|
||||||
- lines_longer_than_80_chars
|
|
||||||
- missing_whitespace_between_adjacent_strings
|
|
||||||
- non_constant_identifier_names
|
|
||||||
- null_closures
|
|
||||||
- one_member_abstracts
|
|
||||||
- only_throw_errors
|
|
||||||
- package_api_docs
|
|
||||||
- package_prefixed_library_names
|
|
||||||
- parameter_assignments
|
|
||||||
- prefer_adjacent_string_concatenation
|
|
||||||
- prefer_asserts_in_initializer_lists
|
|
||||||
- prefer_asserts_with_message
|
|
||||||
- prefer_collection_literals
|
|
||||||
- prefer_conditional_assignment
|
|
||||||
- prefer_const_constructors
|
|
||||||
- prefer_const_constructors_in_immutables
|
|
||||||
- prefer_const_declarations
|
|
||||||
- prefer_const_literals_to_create_immutables
|
|
||||||
- prefer_constructors_over_static_methods
|
|
||||||
- prefer_contains
|
|
||||||
- prefer_equal_for_default_values
|
|
||||||
- prefer_expression_function_bodies
|
|
||||||
- prefer_final_fields
|
|
||||||
- prefer_final_in_for_each
|
|
||||||
- prefer_final_locals
|
|
||||||
- prefer_function_declarations_over_variables
|
|
||||||
- prefer_generic_function_type_aliases
|
|
||||||
- prefer_if_elements_to_conditional_expressions
|
|
||||||
- prefer_if_null_operators
|
|
||||||
- prefer_initializing_formals
|
|
||||||
- prefer_inlined_adds
|
|
||||||
- prefer_int_literals
|
|
||||||
- prefer_interpolation_to_compose_strings
|
|
||||||
- prefer_is_empty
|
|
||||||
- prefer_is_not_empty
|
|
||||||
- prefer_is_not_operator
|
|
||||||
- prefer_null_aware_operators
|
|
||||||
- prefer_single_quotes
|
|
||||||
- prefer_spread_collections
|
|
||||||
- prefer_typing_uninitialized_variables
|
|
||||||
- provide_deprecation_message
|
|
||||||
- public_member_api_docs
|
|
||||||
- recursive_getters
|
|
||||||
- sized_box_for_whitespace
|
|
||||||
- slash_for_doc_comments
|
|
||||||
- sort_child_properties_last
|
|
||||||
- sort_constructors_first
|
|
||||||
- sort_unnamed_constructors_first
|
|
||||||
|
|
||||||
- type_annotate_public_apis
|
|
||||||
- type_init_formals
|
|
||||||
- unnecessary_await_in_return
|
|
||||||
- unnecessary_brace_in_string_interps
|
|
||||||
- unnecessary_const
|
|
||||||
- unnecessary_getters_setters
|
|
||||||
- unnecessary_lambdas
|
|
||||||
- unnecessary_new
|
|
||||||
- unnecessary_null_aware_assignments
|
|
||||||
- unnecessary_null_in_if_null_operators
|
|
||||||
- unnecessary_nullable_for_final_variable_declarations
|
|
||||||
- unnecessary_parenthesis
|
|
||||||
- unnecessary_raw_strings
|
|
||||||
- unnecessary_string_escapes
|
|
||||||
- unnecessary_string_interpolations
|
|
||||||
- unnecessary_this
|
|
||||||
- use_is_even_rather_than_modulo
|
|
||||||
- use_late_for_private_fields_and_variables
|
|
||||||
- use_rethrow_when_possible
|
|
||||||
- use_setters_to_change_properties
|
|
||||||
- use_to_and_as_if_applicable
|
|
||||||
- package_names
|
|
||||||
- sort_pub_dependencies
|
|
||||||
|
|
||||||
- cast_nullable_to_non_nullable
|
|
||||||
- unnecessary_null_checks
|
|
||||||
- tighten_type_of_initializing_formals
|
|
||||||
- null_check_on_nullable_type_parameter
|
|
||||||
Reference in New Issue
Block a user