Skip to content

Commit 8cebaf0

Browse files
authored
team lints: update to latest pkg:lints (#359)
1 parent 815d4ba commit 8cebaf0

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

.github/workflows/dart_flutter_team_lints.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
sdk: [dev] # TODO: add back in stable
29+
sdk: [3.8, dev]
3030
steps:
3131
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
3232
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
@@ -38,6 +38,6 @@ jobs:
3838
- run: dart analyze --fatal-infos
3939

4040
- run: dart format --output=none --set-exit-if-changed .
41-
if: ${{ matrix.sdk == 'stable' }}
41+
if: ${{ matrix.sdk == 'dev' }}
4242

4343
- run: dart test

pkgs/dart_flutter_team_lints/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.5.2
2+
3+
- Depend on the `6.0.0` release of `package:lints`.
4+
- Require Dart `3.8`
5+
16
## 3.5.1
27

38
- Removed `discarded_futures`; this produced more results than expected.

pkgs/dart_flutter_team_lints/lib/analysis_options.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ linter:
4545
- comment_references
4646
- conditional_uri_does_not_exist
4747
- only_throw_errors
48-
- strict_top_level_inference
4948
- test_types_in_equals
5049
- throw_in_finally
5150
- type_annotate_public_apis
5251
- unawaited_futures
53-
- unnecessary_underscores
5452
- unreachable_from_main
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: dart_flutter_team_lints
22
description: An analysis rule set used by the Dart and Flutter teams.
3-
version: 3.5.1
3+
version: 3.5.2
44
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/dart_flutter_team_lints
55
issue_tracker: https://github.com/dart-lang/ecosystem/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Adart_flutter_team_lints
66

77
environment:
8-
sdk: ^3.7.0
8+
sdk: ^3.8.0
99

1010
dependencies:
11-
lints: ^5.0.0
11+
lints: ^6.0.0
1212

1313
dev_dependencies:
1414
checks: ^0.3.0
1515
path: ^1.8.0
16-
test: ^1.0.0
16+
test: ^1.24.0
1717
yaml: ^3.0.0

pkgs/dart_flutter_team_lints/tool/dedup.dart

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ Map<String, Directory>? _findPackageConfig(Directory dir) {
7777
return null;
7878
}
7979

80-
final configFile =
81-
File(path.join(dir.path, '.dart_tool', 'package_config.json'));
80+
final configFile = File(
81+
path.join(dir.path, '.dart_tool', 'package_config.json'),
82+
);
8283
if (configFile.existsSync()) {
8384
return _parseConfigFile(configFile);
8485
} else {
@@ -122,8 +123,9 @@ class Lints {
122123
final lints = (yaml['linter'] as YamlMap?)?['rules'] as YamlList;
123124

124125
return Lints._(
125-
parent:
126-
localInclude == null ? null : Lints.readFrom(localInclude, packages),
126+
parent: localInclude == null
127+
? null
128+
: Lints.readFrom(localInclude, packages),
127129
include: include,
128130
lints: lints.cast<String>().toList(),
129131
);
@@ -133,11 +135,7 @@ class Lints {
133135
final String include;
134136
final List<String> lints;
135137

136-
Lints._({
137-
this.parent,
138-
required this.include,
139-
required this.lints,
140-
});
138+
Lints._({this.parent, required this.include, required this.lints});
141139

142140
Lints? containingInclude(String lint) {
143141
if (lints.contains(lint)) return this;

0 commit comments

Comments
 (0)