mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 05:03:21 +00:00
Mention running optional clippy dependency with cargo rustc
This commit is contained in:
parent
7e65493599
commit
e53babef8f
1 changed files with 2 additions and 0 deletions
|
@ -233,6 +233,8 @@ And, in your `main.rs` or `lib.rs`:
|
||||||
#![cfg_attr(feature="clippy", plugin(clippy))]
|
#![cfg_attr(feature="clippy", plugin(clippy))]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Instead of adding the `cfg_attr` attributes you can also run clippy on demand: `cargo rustc --features clippy -- -Z no-trans -Z extra-plugins=clippy` (the `-Z no trans`, while not neccessary, will stop the compilation process after typechecking (and lints) have completed, which can significantly reduce the runtime).
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
Some lints can be configured in a `clippy.toml` file. It contains basic `variable = value` mapping eg.
|
Some lints can be configured in a `clippy.toml` file. It contains basic `variable = value` mapping eg.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue