Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit cb1a3e6

Browse files
authored
Update pkg:lints, add dependabot, update CI actions (#379)
1 parent 66d899a commit cb1a3e6

File tree

6 files changed

+39
-48
lines changed

6 files changed

+39
-48
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Set update schedule for GitHub Actions
2+
# See https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "monthly"

.github/workflows/test-package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
matrix:
2323
sdk: [dev]
2424
steps:
25-
- uses: actions/checkout@v2
26-
- uses: dart-lang/setup-dart@v1.0
25+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
26+
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
2727
with:
2828
sdk: ${{ matrix.sdk }}
2929
- id: install
@@ -45,8 +45,8 @@ jobs:
4545
os: [ubuntu-latest]
4646
sdk: [2.17.0, dev]
4747
steps:
48-
- uses: actions/checkout@v2
49-
- uses: dart-lang/setup-dart@v1.0
48+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
49+
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
5050
with:
5151
sdk: ${{ matrix.sdk }}
5252
- id: install

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 4.3.1-dev
2+
13
## 4.3.0
24

35
* Add support for adding more implementation in `enum` classes.

analysis_options.yaml

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,46 @@
11
include: package:lints/recommended.yaml
22

33
analyzer:
4-
strong-mode:
5-
implicit-casts: false
6-
implicit-dynamic: false
4+
language:
5+
strict-casts: true
6+
strict-inference: true
7+
strict-raw-types: true
78

89
linter:
910
rules:
10-
# Error Rules
11-
- comment_references
12-
- control_flow_in_finally
13-
- empty_statements
14-
- hash_and_equals
15-
- iterable_contains_unrelated_type
16-
- list_remove_unrelated_type
17-
- no_adjacent_strings_in_list
18-
- test_types_in_equals
19-
- throw_in_finally
20-
21-
# Style Rules
11+
- always_declare_return_types
2212
- avoid_catching_errors
2313
- avoid_private_typedef_functions
2414
- avoid_redundant_argument_values
25-
- avoid_renaming_method_parameters
26-
- avoid_returning_null_for_void
2715
- avoid_unused_constructor_parameters
28-
- await_only_futures
29-
- camel_case_types
16+
- cancel_subscriptions
3017
- cascade_invocations
31-
- constant_identifier_names
18+
- comment_references
3219
- directives_ordering
33-
- file_names
34-
- implementation_imports
3520
- join_return_with_assignment
3621
- lines_longer_than_80_chars
22+
- literal_only_boolean_expressions
3723
- missing_whitespace_between_adjacent_strings
24+
- no_adjacent_strings_in_list
3825
- no_runtimeType_toString
39-
- non_constant_identifier_names
26+
- omit_local_variable_types
4027
- only_throw_errors
41-
- package_names
42-
- package_prefixed_library_names
28+
- package_api_docs
4329
- prefer_asserts_in_initializer_lists
4430
- prefer_const_constructors
4531
- prefer_const_declarations
4632
- prefer_expression_function_bodies
4733
- prefer_final_locals
48-
- prefer_function_declarations_over_variables
49-
- prefer_initializing_formals
50-
- prefer_inlined_adds
51-
- prefer_interpolation_to_compose_strings
52-
- prefer_is_not_operator
53-
- prefer_null_aware_operators
5434
- prefer_relative_imports
55-
- prefer_typing_uninitialized_variables
56-
- prefer_void_to_null
57-
- provide_deprecation_message
35+
- prefer_single_quotes
5836
- sort_pub_dependencies
59-
- unnecessary_brace_in_string_interps
37+
- test_types_in_equals
38+
- throw_in_finally
39+
- type_annotate_public_apis
40+
- unawaited_futures
41+
- unnecessary_await_in_return
6042
- unnecessary_lambdas
61-
- unnecessary_null_aware_assignments
62-
- unnecessary_overrides
6343
- unnecessary_parenthesis
6444
- unnecessary_statements
65-
- unnecessary_string_interpolations
6645
- use_string_buffers
67-
- void_checks
46+
- use_super_parameters

lib/src/matchers.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class EqualsDart extends Matcher {
5555
Description describeMismatch(
5656
covariant Spec item,
5757
Description mismatchDescription,
58-
matchState,
59-
verbose,
58+
Map<dynamic, dynamic> matchState,
59+
bool verbose,
6060
) {
6161
final actualSource = _dart(item, _emitter);
6262
return equals(_expectedSource).describeMismatch(
@@ -68,6 +68,6 @@ class EqualsDart extends Matcher {
6868
}
6969

7070
@override
71-
bool matches(covariant Spec item, matchState) =>
71+
bool matches(covariant Spec item, Object? matchState) =>
7272
_dart(item, _emitter) == _expectedSource;
7373
}

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: code_builder
2-
version: 4.3.0
2+
version: 4.3.1-dev
33
description: >-
44
A fluent, builder-based library for generating valid Dart code
55
repository: https://github.com/dart-lang/code_builder
@@ -19,6 +19,6 @@ dev_dependencies:
1919
build_runner: ^2.0.3
2020
built_value_generator: ^8.0.0
2121
dart_style: ^2.0.0
22-
lints: ^1.0.0
22+
lints: ^2.0.0
2323
source_gen: ^1.0.0
2424
test: ^1.16.0

0 commit comments

Comments
 (0)