Skip to content

Commit 2ff1ec1

Browse files
authored
Run clippy on all targets (#312)
## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective Previously we were running it only on the lib code and tests, with this change we run it on examples and benchmarks as well. Note that by target it doesn't mean platform target (like `aarch64-apple-darwin`) but compilation target (libraries, binaries, tests, benchmarks, examples) ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
1 parent 7df091e commit 2ff1ec1

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/lint.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
branches: ["main"]
77
pull_request:
88

9+
permissions: {}
10+
911
env:
1012
CARGO_TERM_COLOR: always
1113

@@ -15,6 +17,9 @@ jobs:
1517

1618
runs-on: ubuntu-24.04
1719

20+
permissions:
21+
contents: read
22+
1823
steps:
1924
- name: Checkout
2025
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -54,7 +59,7 @@ jobs:
5459
run: cargo install clippy-sarif sarif-fmt --locked --git https://github.com/psastras/sarif-rs.git --rev 11c33a53f6ffeaed736856b86fb6b7b09fabdfd8
5560

5661
- name: Cargo clippy-sarif
57-
run: cargo clippy --all-features --tests --message-format=json |
62+
run: cargo clippy --all-features --all-targets --message-format=json |
5863
clippy-sarif | tee clippy_result.sarif | sarif-fmt
5964
env:
6065
RUSTFLAGS: "-D warnings"
@@ -70,7 +75,7 @@ jobs:
7075
# status code of the command is caught and reported as failed in GitHub.
7176
# This should be cached from the previous step and should be fast.
7277
- name: Cargo clippy
73-
run: cargo clippy --all-features --tests
78+
run: cargo clippy --all-features --all-targets
7479
env:
7580
RUSTFLAGS: "-D warnings"
7681

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export RUSTFLAGS="-D warnings"
144144
145145
cargo +nightly fmt --check
146146
cargo +nightly udeps --workspace --all-features
147-
cargo clippy --all-features --tests
147+
cargo clippy --all-features --all-targets
148148
cargo sort --workspace --check
149149
npm run lint
150150
```

0 commit comments

Comments
 (0)