You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This should ideally trigger whenever there is a commit to the [Dart Linter rules](https://raw.githubusercontent.com/dart-lang/sdk/main/pkg/linter/tool/machine/rules.json).
5
+
# However, this is not yet possible see: https://github.com/orgs/community/discussions/26323
6
+
schedule:
7
+
# At 08:06 on every day-of-week from Monday through Friday.
8
+
- cron: "6 8 * * 1-5"
9
+
workflow_dispatch:
10
+
11
+
jobs:
12
+
build:
13
+
defaults:
14
+
run:
15
+
working-directory: tool/linter_rules
16
+
17
+
runs-on: ubuntu-latest
18
+
19
+
steps:
20
+
- name: 📚 Git Checkout
21
+
uses: actions/checkout@v4
22
+
23
+
- name: 🎯 Setup Dart
24
+
uses: dart-lang/setup-dart@v1
25
+
26
+
- name: 📦 Install Dependencies
27
+
run: dart pub get
28
+
29
+
- name: 🔍 Check for changes
30
+
id: make
31
+
run: if dart lib/exclusion_reason_table.dart --set-exit-if-changed; then echo "did_change=false"; else echo "did_change=true"; fi >> $GITHUB_ENV
Copy file name to clipboardExpand all lines: tool/linter_rules/README.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,13 +19,23 @@ The reasons are defined in the [`exclusion_reasons.json`](exclusion_reasons.json
19
19
To generate the exclusion reason table, run the following command (from `tool/linter_rules`, and don't forget to `dart pub get`):
20
20
21
21
```sh
22
-
dart lib/exclusion_reason_table.dart$version
22
+
dart lib/exclusion_reason_table.dart
23
23
```
24
24
25
-
This command will update the README table for the rules that are not enabled by default in the specified `$version` of Very Good Analysis. The `$version` is a user specified argument and it should be in the format `x.y.z`. In addition, no longer excluded rules will be removed from the `exclusion_reasons.json` file. The command does not format the output, so it is recommended to format both files with your preferred formatter after running the command.
25
+
This command will update the README table for the rules that are not enabled by default in the specified `$version` of Very Good Analysis.
26
+
27
+
In addition, no longer excluded rules will be removed from the `exclusion_reasons.json` file. The command does not format the output, so it is recommended to format both files with your preferred formatter after running the command.
26
28
27
29
Rules that are missing a reason in the `exclusion_reasons.json` file will be given the reason `Not specified`.
| version | The Very Good Analysis version to use. | latest (from lib/analysis_options.yaml) |
36
+
| set-exit-if-changed | Set the exit code to 2 if there are changes to the exclusion reasons. | false |
37
+
38
+
29
39
## Inspection 🔍
30
40
31
41
If you're looking to update Very Good Analysis you might want to inspect the health of the latest rule set. You can use the script at `bin/inspect.dart` to do exactly that.
0 commit comments