File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
book/src/continuous_integration Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11# Continuous Integration
22
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" ` .
56
67We recommend to use Clippy from the same toolchain, that you use for compiling
78your 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`.
66``` yml
77on : push
88name : Clippy check
9+
10+ # Make sure CI fails on all warnings, including Clippy lints
11+ env :
12+ RUSTFLAGS : " -Dwarnings"
13+
914jobs :
1015 clippy_check :
1116 runs-on : ubuntu-latest
1217 steps :
1318 - uses : actions/checkout@v1
1419 - name : Run Clippy
15- run : cargo clippy
20+ run : cargo clippy --all-targets --all-features
1621` ` `
You can’t perform that action at this time.
0 commit comments