File tree 2 files changed +9
-3
lines changed
book/src/continuous_integration
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Continuous Integration
2
2
3
- It is recommended to run Clippy on CI, preferably with ` -Dwarnings ` , so that
4
- Clippy lints prevent CI from passing.
3
+ It is recommended to run Clippy on CI with ` -Dwarnings ` , so that Clippy lints
4
+ prevent CI from passing. To enforce errors on warnings on all ` cargo ` commands
5
+ not just ` cargo clippy ` , you can set the env var ` RUSTFLAGS="-Dwarnings" ` .
5
6
6
7
We recommend to use Clippy from the same toolchain, that you use for compiling
7
8
your crate for maximum compatibility. E.g. if your crate is compiled with the
Original file line number Diff line number Diff line change @@ -6,11 +6,16 @@ pre-installed. So all you have to do is to run `cargo clippy`.
6
6
``` yml
7
7
on : push
8
8
name : Clippy check
9
+
10
+ # Make sure CI fails on all warnings, including Clippy lints
11
+ env :
12
+ RUSTFLAGS : " -Dwarnings"
13
+
9
14
jobs :
10
15
clippy_check :
11
16
runs-on : ubuntu-latest
12
17
steps :
13
18
- uses : actions/checkout@v1
14
19
- name : Run Clippy
15
- run : cargo clippy
20
+ run : cargo clippy --all-targets --all-features
16
21
` ` `
You can’t perform that action at this time.
0 commit comments