rust-clippy/book/src/continuous_integration
bors 0bf0b88035 Auto merge of #12025 - jetlime:master, r=flip1995
Include GitLab in the CI section of the clippy doc book

Fixes #12012
changelog: Docs: [`Continuous Integration`] now includes how to use clippy in GitLab CI.
2024-01-04 10:48:53 +00:00
..
github_actions.md ci: Update to actions/checkout@v4 from v3. 2023-12-26 18:43:16 -05:00
gitlab.md Include GitLab in the CI section of the clippy doc book 2024-01-04 11:43:38 +01:00
README.md Book: Improve chapter on CI 2022-06-06 16:17:58 +02:00
travis.md Book: Split up and rewrite installation and usage 2022-06-06 16:16:01 +02:00

Continuous Integration

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 stable toolchain, you should also use stable Clippy.

Note: New Clippy lints are first added to the nightly toolchain. If you want to help with improving Clippy and have CI resources left, please consider adding a nightly Clippy check to your CI and report problems like false positives back to us. With that we can fix bugs early, before they can get to stable.

This chapter will give an overview on how to use Clippy on different popular CI providers.