Book: Improve chapter on CI
Recommend the -Dwarnings and --all-targets/--all-features more strongly.
This commit is contained in:
parent
1f11cd17ac
commit
9305659922
@ -1,7 +1,8 @@
|
||||
# Continuous Integration
|
||||
|
||||
It is recommended to run Clippy on CI, preferably with `-Dwarnings`, so that
|
||||
Clippy lints prevent CI from passing.
|
||||
It is recommended to run Clippy on CI with `-Dwarnings`, so that Clippy lints
|
||||
prevent CI from passing. To enforce errors on warnings on all `cargo` commands
|
||||
not just `cargo clippy`, you can set the env var `RUSTFLAGS="-Dwarnings"`.
|
||||
|
||||
We recommend to use Clippy from the same toolchain, that you use for compiling
|
||||
your crate for maximum compatibility. E.g. if your crate is compiled with the
|
||||
|
@ -6,11 +6,16 @@ pre-installed. So all you have to do is to run `cargo clippy`.
|
||||
```yml
|
||||
on: push
|
||||
name: Clippy check
|
||||
|
||||
# Make sure CI fails on all warnings, including Clippy lints
|
||||
env:
|
||||
RUSTFLAGS: "-Dwarnings"
|
||||
|
||||
jobs:
|
||||
clippy_check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Run Clippy
|
||||
run: cargo clippy
|
||||
run: cargo clippy --all-targets --all-features
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user