File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 1
- # This is the clippy workflow, separate from the main 'Rust' workflow
2
- #
3
- # This will fail if clippy fails (if we encounter any of its "correctness" lints)
4
- #
5
- # Clippy warnings won't fail the build. They may or may not turn into Github warnings.
6
- #
7
- # TODO: Test clippy with different feature combos?
8
- # TODO: Should we fail on clippy warnings?
9
1
on : [push, pull_request]
10
2
name : Clippy
11
3
@@ -21,17 +13,29 @@ jobs:
21
13
clippy :
22
14
# Only run on PRs if the source branch is on someone else's repo
23
15
if : ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
16
+
24
17
runs-on : ubuntu-latest
25
18
strategy :
19
+ fail-fast : false
26
20
matrix :
27
21
rust :
22
+ # in hardcoded versions, warnings will fail the build
23
+ - 1.89
24
+ # in auto-updated versions, warnings will not fail the build
28
25
- stable
26
+ - nightly
27
+
29
28
steps :
30
- - uses : actions/checkout@v2
29
+ - uses : actions/checkout@v4
31
30
- uses : dtolnay/rust-toolchain@master
32
31
with :
33
32
toolchain : ${{ matrix.rust }}
34
33
components : clippy
35
- - shell : bash
34
+ - name : Clippy
36
35
run : |
37
- cargo clippy
36
+ cargo clippy --all --all-targets --verbose --all-features -- -D warnings
37
+ # When using hardcoded/pinned versions, warnings are forbidden.
38
+ #
39
+ # On automatically updated versions of rust (both stable & nightly) we allow clippy to fail.
40
+ # This is because automatic updates can introduce new lints or change existing lints.
41
+ continue-on-error : ${{ !contains(matrix.rust, '1.') }}
You can’t perform that action at this time.
0 commit comments