add 'unnecessary_library_name' to package:dart_flutter_team_lints (#252)
* add 'unnecessary_library_name' to package:dart_flutter_team_lints
* require dart 3.4
* update package:dart_flutter_team_lints deps
* remove the local pubspec_overrides.yaml files
diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml
index 1d04e96..6ea6631 100644
--- a/.github/workflows/dart.yml
+++ b/.github/workflows/dart.yml
@@ -39,16 +39,16 @@
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
- name: "analyze_and_format; Dart 3.1.0; PKGS: pkgs/corpus, pkgs/dart_flutter_team_lints, pkgs/firehose, pkgs/repo_manage; `dart analyze --fatal-infos .`"
+ name: "analyze_and_format; Dart 3.1.0; PKGS: pkgs/corpus, pkgs/firehose, pkgs/repo_manage; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
- key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/corpus-pkgs/dart_flutter_team_lints-pkgs/firehose-pkgs/repo_manage;commands:analyze"
+ key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/corpus-pkgs/firehose-pkgs/repo_manage;commands:analyze"
restore-keys: |
- os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/corpus-pkgs/dart_flutter_team_lints-pkgs/firehose-pkgs/repo_manage
+ os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/corpus-pkgs/firehose-pkgs/repo_manage
os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
@@ -68,15 +68,6 @@
run: dart analyze --fatal-infos .
if: "always() && steps.pkgs_corpus_pub_upgrade.conclusion == 'success'"
working-directory: pkgs/corpus
- - id: pkgs_dart_flutter_team_lints_pub_upgrade
- name: pkgs/dart_flutter_team_lints; dart pub upgrade
- run: dart pub upgrade
- if: "always() && steps.checkout.conclusion == 'success'"
- working-directory: pkgs/dart_flutter_team_lints
- - name: "pkgs/dart_flutter_team_lints; dart analyze --fatal-infos ."
- run: dart analyze --fatal-infos .
- if: "always() && steps.pkgs_dart_flutter_team_lints_pub_upgrade.conclusion == 'success'"
- working-directory: pkgs/dart_flutter_team_lints
- id: pkgs_firehose_pub_upgrade
name: pkgs/firehose; dart pub upgrade
run: dart pub upgrade
@@ -98,6 +89,38 @@
needs:
- job_001
job_003:
+ name: "analyze_and_format; Dart 3.4.0; PKG: pkgs/dart_flutter_team_lints; `dart analyze --fatal-infos .`"
+ runs-on: ubuntu-latest
+ steps:
+ - name: Cache Pub hosted dependencies
+ uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
+ with:
+ path: "~/.pub-cache/hosted"
+ key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/dart_flutter_team_lints;commands:analyze"
+ restore-keys: |
+ os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/dart_flutter_team_lints
+ os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
+ os:ubuntu-latest;pub-cache-hosted
+ os:ubuntu-latest
+ - name: Setup Dart SDK
+ uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
+ with:
+ sdk: "3.4.0"
+ - id: checkout
+ name: Checkout repository
+ uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
+ - id: pkgs_dart_flutter_team_lints_pub_upgrade
+ name: pkgs/dart_flutter_team_lints; dart pub upgrade
+ run: dart pub upgrade
+ if: "always() && steps.checkout.conclusion == 'success'"
+ working-directory: pkgs/dart_flutter_team_lints
+ - name: "pkgs/dart_flutter_team_lints; dart analyze --fatal-infos ."
+ run: dart analyze --fatal-infos .
+ if: "always() && steps.pkgs_dart_flutter_team_lints_pub_upgrade.conclusion == 'success'"
+ working-directory: pkgs/dart_flutter_team_lints
+ needs:
+ - job_001
+ job_004:
name: "analyze_and_format; Dart dev; PKGS: pkgs/corpus, pkgs/dart_flutter_team_lints, pkgs/firehose, pkgs/repo_manage; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
@@ -156,7 +179,7 @@
working-directory: pkgs/repo_manage
needs:
- job_001
- job_004:
+ job_005:
name: "analyze_and_format; Dart dev; PKGS: pkgs/corpus, pkgs/dart_flutter_team_lints, pkgs/firehose, pkgs/repo_manage; `dart format --output=none --set-exit-if-changed .`"
runs-on: ubuntu-latest
steps:
@@ -215,7 +238,7 @@
working-directory: pkgs/repo_manage
needs:
- job_001
- job_005:
+ job_006:
name: "unit_test; Dart 3.1.0; PKG: pkgs/corpus; `dart test`"
runs-on: ubuntu-latest
steps:
@@ -250,41 +273,7 @@
- job_002
- job_003
- job_004
- job_006:
- name: "unit_test; Dart 3.1.0; PKG: pkgs/dart_flutter_team_lints; `dart test`"
- runs-on: ubuntu-latest
- steps:
- - name: Cache Pub hosted dependencies
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
- with:
- path: "~/.pub-cache/hosted"
- key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/dart_flutter_team_lints;commands:test_1"
- restore-keys: |
- os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0;packages:pkgs/dart_flutter_team_lints
- os:ubuntu-latest;pub-cache-hosted;sdk:3.1.0
- os:ubuntu-latest;pub-cache-hosted
- os:ubuntu-latest
- - name: Setup Dart SDK
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
- with:
- sdk: "3.1.0"
- - id: checkout
- name: Checkout repository
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- - id: pkgs_dart_flutter_team_lints_pub_upgrade
- name: pkgs/dart_flutter_team_lints; dart pub upgrade
- run: dart pub upgrade
- if: "always() && steps.checkout.conclusion == 'success'"
- working-directory: pkgs/dart_flutter_team_lints
- - name: pkgs/dart_flutter_team_lints; dart test
- run: dart test
- if: "always() && steps.pkgs_dart_flutter_team_lints_pub_upgrade.conclusion == 'success'"
- working-directory: pkgs/dart_flutter_team_lints
- needs:
- - job_001
- - job_002
- - job_003
- - job_004
+ - job_005
job_007:
name: "unit_test; Dart 3.1.0; PKG: pkgs/firehose; `dart test`"
runs-on: ubuntu-latest
@@ -320,7 +309,44 @@
- job_002
- job_003
- job_004
+ - job_005
job_008:
+ name: "unit_test; Dart 3.4.0; PKG: pkgs/dart_flutter_team_lints; `dart test`"
+ runs-on: ubuntu-latest
+ steps:
+ - name: Cache Pub hosted dependencies
+ uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
+ with:
+ path: "~/.pub-cache/hosted"
+ key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/dart_flutter_team_lints;commands:test_1"
+ restore-keys: |
+ os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/dart_flutter_team_lints
+ os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
+ os:ubuntu-latest;pub-cache-hosted
+ os:ubuntu-latest
+ - name: Setup Dart SDK
+ uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
+ with:
+ sdk: "3.4.0"
+ - id: checkout
+ name: Checkout repository
+ uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
+ - id: pkgs_dart_flutter_team_lints_pub_upgrade
+ name: pkgs/dart_flutter_team_lints; dart pub upgrade
+ run: dart pub upgrade
+ if: "always() && steps.checkout.conclusion == 'success'"
+ working-directory: pkgs/dart_flutter_team_lints
+ - name: pkgs/dart_flutter_team_lints; dart test
+ run: dart test
+ if: "always() && steps.pkgs_dart_flutter_team_lints_pub_upgrade.conclusion == 'success'"
+ working-directory: pkgs/dart_flutter_team_lints
+ needs:
+ - job_001
+ - job_002
+ - job_003
+ - job_004
+ - job_005
+ job_009:
name: "unit_test; Dart dev; PKG: pkgs/corpus; `dart test`"
runs-on: ubuntu-latest
steps:
@@ -355,7 +381,8 @@
- job_002
- job_003
- job_004
- job_009:
+ - job_005
+ job_010:
name: "unit_test; Dart dev; PKG: pkgs/dart_flutter_team_lints; `dart test`"
runs-on: ubuntu-latest
steps:
@@ -390,7 +417,8 @@
- job_002
- job_003
- job_004
- job_010:
+ - job_005
+ job_011:
name: "unit_test; Dart dev; PKG: pkgs/firehose; `dart test`"
runs-on: ubuntu-latest
steps:
@@ -425,7 +453,8 @@
- job_002
- job_003
- job_004
- job_011:
+ - job_005
+ job_012:
name: "analyze_format; Dart dev; PKG: pkgs/blast_repo; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
@@ -470,7 +499,8 @@
- job_008
- job_009
- job_010
- job_012:
+ - job_011
+ job_013:
name: "test; Dart dev; PKG: pkgs/blast_repo; `dart test --test-randomize-ordering-seed=random`"
runs-on: ubuntu-latest
steps:
@@ -512,3 +542,4 @@
- job_009
- job_010
- job_011
+ - job_012
diff --git a/pkgs/blast_repo/pubspec.yaml b/pkgs/blast_repo/pubspec.yaml
index 6c2522e..0b8eae9 100644
--- a/pkgs/blast_repo/pubspec.yaml
+++ b/pkgs/blast_repo/pubspec.yaml
@@ -20,7 +20,7 @@
yaml_edit: ^2.1.0
dev_dependencies:
- dart_flutter_team_lints: ^2.0.0
+ dart_flutter_team_lints: ^3.0.0
test: ^1.22.0
test_descriptor: ^2.0.0
diff --git a/pkgs/corpus/pubspec.yaml b/pkgs/corpus/pubspec.yaml
index e27019c..ff49626 100644
--- a/pkgs/corpus/pubspec.yaml
+++ b/pkgs/corpus/pubspec.yaml
@@ -18,6 +18,6 @@
dev_dependencies:
checks: ^0.3.0
- dart_flutter_team_lints: ^2.0.0
+ dart_flutter_team_lints: ^3.0.0
test: ^1.22.0
test_descriptor: ^2.0.0
diff --git a/pkgs/corpus/pubspec_overrides.yaml b/pkgs/corpus/pubspec_overrides.yaml
deleted file mode 100644
index fbd1c0a..0000000
--- a/pkgs/corpus/pubspec_overrides.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-dependency_overrides:
- dart_flutter_team_lints:
- path: ../dart_flutter_team_lints
diff --git a/pkgs/dart_flutter_team_lints/CHANGELOG.md b/pkgs/dart_flutter_team_lints/CHANGELOG.md
index ba87372..c71f9d6 100644
--- a/pkgs/dart_flutter_team_lints/CHANGELOG.md
+++ b/pkgs/dart_flutter_team_lints/CHANGELOG.md
@@ -1,7 +1,12 @@
+## 3.1.0
+
+- Added `unnecessary_library_name`.
+- Require Dart `3.4`.
+
## 3.0.0
-- Depend on the `4.0.0` release of `package:lints` adding
- the `no_wildcard_variable_uses` lint.
+- Depend on the `4.0.0` release of `package:lints`, adding the
+ `no_wildcard_variable_uses` lint.
- Require Dart `3.1.0` or later.
## 2.1.1
diff --git a/pkgs/dart_flutter_team_lints/lib/analysis_options.yaml b/pkgs/dart_flutter_team_lints/lib/analysis_options.yaml
index 5a38333..6bbadef 100644
--- a/pkgs/dart_flutter_team_lints/lib/analysis_options.yaml
+++ b/pkgs/dart_flutter_team_lints/lib/analysis_options.yaml
@@ -34,6 +34,7 @@
- sort_pub_dependencies
- unnecessary_lambdas
- unnecessary_library_directive
+ - unnecessary_library_name
- unnecessary_parenthesis
- unnecessary_statements
- use_is_even_rather_than_modulo
diff --git a/pkgs/dart_flutter_team_lints/pubspec.yaml b/pkgs/dart_flutter_team_lints/pubspec.yaml
index c9d437e..9d0fac3 100644
--- a/pkgs/dart_flutter_team_lints/pubspec.yaml
+++ b/pkgs/dart_flutter_team_lints/pubspec.yaml
@@ -1,10 +1,10 @@
name: dart_flutter_team_lints
description: An analysis rule set used by the Dart and Flutter teams.
-version: 3.0.0
+version: 3.1.0
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/dart_flutter_team_lints
environment:
- sdk: ^3.1.0
+ sdk: ^3.4.0
dependencies:
lints: ^4.0.0
diff --git a/pkgs/firehose/pubspec.yaml b/pkgs/firehose/pubspec.yaml
index 90cda46..f6a6b6e 100644
--- a/pkgs/firehose/pubspec.yaml
+++ b/pkgs/firehose/pubspec.yaml
@@ -22,5 +22,5 @@
yaml: ^3.1.0
dev_dependencies:
- dart_flutter_team_lints: ^2.0.0
+ dart_flutter_team_lints: ^3.0.0
test: ^1.21.0
diff --git a/pkgs/firehose/pubspec_overrides.yaml b/pkgs/firehose/pubspec_overrides.yaml
deleted file mode 100644
index fbd1c0a..0000000
--- a/pkgs/firehose/pubspec_overrides.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-dependency_overrides:
- dart_flutter_team_lints:
- path: ../dart_flutter_team_lints
diff --git a/pkgs/repo_manage/pubspec.yaml b/pkgs/repo_manage/pubspec.yaml
index 4125687..8292b17 100644
--- a/pkgs/repo_manage/pubspec.yaml
+++ b/pkgs/repo_manage/pubspec.yaml
@@ -14,4 +14,4 @@
path: ^1.8.0
dev_dependencies:
- dart_flutter_team_lints: ^2.0.0
+ dart_flutter_team_lints: ^3.0.0
diff --git a/pkgs/repo_manage/pubspec_overrides.yaml b/pkgs/repo_manage/pubspec_overrides.yaml
deleted file mode 100644
index fbd1c0a..0000000
--- a/pkgs/repo_manage/pubspec_overrides.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-dependency_overrides:
- dart_flutter_team_lints:
- path: ../dart_flutter_team_lints