diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..71cdeea --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +# Set update schedule for GitHub Actions +# See https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot + +version: 2 +updates: + +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 52cb01c..b40c641 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -22,8 +22,8 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - id: install @@ -45,8 +45,8 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - id: install diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e07b83..dfafdae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 4.3.1-dev + ## 4.3.0 * Add support for adding more implementation in `enum` classes. diff --git a/analysis_options.yaml b/analysis_options.yaml index bf0f0b6..9d6246a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,67 +1,46 @@ include: package:lints/recommended.yaml analyzer: - strong-mode: - implicit-casts: false - implicit-dynamic: false + language: + strict-casts: true + strict-inference: true + strict-raw-types: true linter: rules: - # Error Rules - - comment_references - - control_flow_in_finally - - empty_statements - - hash_and_equals - - iterable_contains_unrelated_type - - list_remove_unrelated_type - - no_adjacent_strings_in_list - - test_types_in_equals - - throw_in_finally - - # Style Rules + - always_declare_return_types - avoid_catching_errors - avoid_private_typedef_functions - avoid_redundant_argument_values - - avoid_renaming_method_parameters - - avoid_returning_null_for_void - avoid_unused_constructor_parameters - - await_only_futures - - camel_case_types + - cancel_subscriptions - cascade_invocations - - constant_identifier_names + - comment_references - directives_ordering - - file_names - - implementation_imports - join_return_with_assignment - lines_longer_than_80_chars + - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings + - no_adjacent_strings_in_list - no_runtimeType_toString - - non_constant_identifier_names + - omit_local_variable_types - only_throw_errors - - package_names - - package_prefixed_library_names + - package_api_docs - prefer_asserts_in_initializer_lists - prefer_const_constructors - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals - - prefer_function_declarations_over_variables - - prefer_initializing_formals - - prefer_inlined_adds - - prefer_interpolation_to_compose_strings - - prefer_is_not_operator - - prefer_null_aware_operators - prefer_relative_imports - - prefer_typing_uninitialized_variables - - prefer_void_to_null - - provide_deprecation_message + - prefer_single_quotes - sort_pub_dependencies - - unnecessary_brace_in_string_interps + - test_types_in_equals + - throw_in_finally + - type_annotate_public_apis + - unawaited_futures + - unnecessary_await_in_return - unnecessary_lambdas - - unnecessary_null_aware_assignments - - unnecessary_overrides - unnecessary_parenthesis - unnecessary_statements - - unnecessary_string_interpolations - use_string_buffers - - void_checks + - use_super_parameters diff --git a/lib/src/matchers.dart b/lib/src/matchers.dart index 11d3d6d..0cdf739 100644 --- a/lib/src/matchers.dart +++ b/lib/src/matchers.dart @@ -55,8 +55,8 @@ class EqualsDart extends Matcher { Description describeMismatch( covariant Spec item, Description mismatchDescription, - matchState, - verbose, + Map matchState, + bool verbose, ) { final actualSource = _dart(item, _emitter); return equals(_expectedSource).describeMismatch( @@ -68,6 +68,6 @@ class EqualsDart extends Matcher { } @override - bool matches(covariant Spec item, matchState) => + bool matches(covariant Spec item, Object? matchState) => _dart(item, _emitter) == _expectedSource; } diff --git a/pubspec.yaml b/pubspec.yaml index cfb77c6..d24b165 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: code_builder -version: 4.3.0 +version: 4.3.1-dev description: >- A fluent, builder-based library for generating valid Dart code repository: https://github.com/dart-lang/code_builder @@ -19,6 +19,6 @@ dev_dependencies: build_runner: ^2.0.3 built_value_generator: ^8.0.0 dart_style: ^2.0.0 - lints: ^1.0.0 + lints: ^2.0.0 source_gen: ^1.0.0 test: ^1.16.0