This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ # A helper workflow to automatically fixup any linting errors on a PR. Must be
2
+ # triggered manually.
3
+
4
+ name : Attempt to automatically fix linting errors
5
+
6
+ on :
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ fixup :
11
+ name : Fix up
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - name : Checkout repository
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Install Rust
19
+ uses : dtolnay/rust-toolchain@master
20
+ with :
21
+ # We use nightly so that `fmt` correctly groups together imports, and
22
+ # clippy correctly fixes up the benchmarks.
23
+ toolchain : nightly-2022-12-01
24
+ components : rustfmt
25
+ - uses : Swatinem/rust-cache@v2
26
+
27
+ - name : Setup Poetry
28
+ uses : matrix-org/setup-python-poetry@v1
29
+ with :
30
+ install-project : " false"
31
+
32
+ - name : Import order (isort)
33
+ continue-on-error : true
34
+ run : poetry run isort .
35
+
36
+ - name : Code style (black)
37
+ continue-on-error : true
38
+ run : poetry run black .
39
+
40
+ - name : Semantic checks (ruff)
41
+ continue-on-error : true
42
+ run : poetry run ruff --fix .
43
+
44
+ - run : cargo clippy --all-features --fix -- -D warnings
45
+ continue-on-error : true
46
+
47
+ - run : cargo fmt
48
+ continue-on-error : true
49
+
50
+ - uses : stefanzweifel/git-auto-commit-action@v5
51
+ with :
52
+ commit_message : " Attempt to fix linting"
Original file line number Diff line number Diff line change
1
+ Add a workflow to try and automatically fixup linting in a PR.
You can’t perform that action at this time.
0 commit comments