diff options
| -rw-r--r-- | book/src/continuous_integration/README.md | 5 | ||||
| -rw-r--r-- | book/src/continuous_integration/github_actions.md | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/book/src/continuous_integration/README.md b/book/src/continuous_integration/README.md index 9f1374193de..e5c3673bde4 100644 --- a/book/src/continuous_integration/README.md +++ b/book/src/continuous_integration/README.md @@ -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 diff --git a/book/src/continuous_integration/github_actions.md b/book/src/continuous_integration/github_actions.md index 4154c60dbd2..42a43ef1380 100644 --- a/book/src/continuous_integration/github_actions.md +++ b/book/src/continuous_integration/github_actions.md @@ -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 ``` |
