Skip to content

Commit 55db2aa

Browse files
committed
Only run dylint on all targets
1 parent fadd305 commit 55db2aa

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

.github/workflows/lint.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ jobs:
5959
- name: Install clippy-sarif and sarif-fmt
6060
run: cargo install clippy-sarif sarif-fmt --locked --git https://github.com/psastras/sarif-rs.git --rev 11c33a53f6ffeaed736856b86fb6b7b09fabdfd8
6161

62-
- name: Cargo clippy-sarif
63-
run: cargo clippy --all-features --all-targets --message-format=json |
62+
- name: Install cargo-dylint
63+
run: cargo install cargo-dylint dylint-link --version 4.1.0 --locked
64+
65+
- name: Cargo dylint-sarif
66+
run: cargo dylint --all -- --all-features --all-targets --message-format=json |
6467
clippy-sarif | tee clippy_result.sarif | sarif-fmt
6568
env:
6669
RUSTFLAGS: "-D warnings"
@@ -75,8 +78,8 @@ jobs:
7578
# Run it again but this time without the sarif output so that the
7679
# status code of the command is caught and reported as failed in GitHub.
7780
# This should be cached from the previous step and should be fast.
78-
- name: Cargo clippy
79-
run: cargo clippy --all-features --all-targets
81+
- name: Cargo dylint
82+
run: cargo dylint --all -- --all-features --all-targets
8083
env:
8184
RUSTFLAGS: "-D warnings"
8285

@@ -92,12 +95,6 @@ jobs:
9295
- name: Cargo udeps
9396
run: cargo +"${{ steps.nightly-toolchain.outputs.RUST_NIGHTLY_TOOLCHAIN }}" udeps --workspace --all-features
9497

95-
- name: Install cargo-dylint
96-
run: cargo install cargo-dylint dylint-link --version 4.1.0 --locked
97-
98-
- name: Cargo dylint
99-
run: cargo dylint --all
100-
10198
- name: Set up Node
10299
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
103100
with:

lint-staged.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ export default {
22
"*": "prettier --cache --ignore-unknown --write",
33
"*.rs": (stagedFiles) => [
44
"cargo +nightly fmt",
5-
"cargo clippy --all-features --all-targets",
6-
"cargo dylint --all",
5+
"cargo dylint --all -- --all-features --all-targets",
76
],
87
"Cargo.toml": (stagedFiles) => [
98
"cargo +nightly fmt",

0 commit comments

Comments
 (0)