-We are currently in the process of discussing Clippy 1.0 via the RFC process in https://github.com/rust-lang/rfcs/pull/2476 . The RFC's goal is to clarify policies around lint categorizations and the policy around which lints should be in the compiler and which lints should be in Clippy. Please leave your thoughts on the RFC PR.
-
# Clippy
[![Build Status](https://travis-ci.org/rust-lang/rust-clippy.svg?branch=master)](https://travis-ci.org/rust-lang/rust-clippy)
A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code.
-[There are 288 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
+[There are 290 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
We have a bunch of lint categories to allow you to choose how much Clippy is supposed to ~~annoy~~ help you:
Once you have rustup and the latest stable release (at least Rust 1.29) installed, run the following command:
```terminal
-rustup component add clippy-preview
+rustup component add clippy
```
Now you can run Clippy by invoking `cargo clippy`.
- stable
- beta
before_script:
- - rustup component add clippy-preview
+ - rustup component add clippy
script:
- cargo clippy
# if you want the build job to fail when encountering warnings, use
# etc.
```
+It might happen that clippy is not available for a certain nightly release.
+In this case you can try to conditionally install clippy from the git repo.
+
+```yaml
+language: rust
+rust:
+ - nightly
+before_script:
+ - rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
+ # etc
+```
+
## Configuration
Some lints can be configured in a TOML file named `clippy.toml` or `.clippy.toml`. It contains a basic `variable = value` mapping eg.