mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 00:20:36 +00:00
Clarify readme
This commit is contained in:
parent
17b7b413f7
commit
d4ebd68df2
1 changed files with 4 additions and 1 deletions
|
@ -143,7 +143,7 @@ Add in your `Cargo.toml`:
|
|||
clippy = "*"
|
||||
```
|
||||
|
||||
You may also use [`cargo clippy`](https://github.com/arcnmx/cargo-clippy), a custom cargo subcommand that runs clippy on a given project.
|
||||
You then need to add `#![feature(plugin)]` and `#![plugin(clippy)]` to the top of your crate entry point (`main.rs` or `lib.rs`).
|
||||
|
||||
Sample `main.rs`:
|
||||
```rust
|
||||
|
@ -172,6 +172,9 @@ src/main.rs:8:5: 11:6 help: Try
|
|||
if let Some(y) = x { println!("{:?}", y) }
|
||||
```
|
||||
|
||||
|
||||
An alternate way to use clippy is by compiling and using [`cargo clippy`](https://github.com/arcnmx/cargo-clippy), a custom cargo subcommand that runs clippy on a given project.
|
||||
|
||||
You can add options to `allow`/`warn`/`deny`:
|
||||
- the whole set of `Warn` lints using the `clippy` lint group (`#![deny(clippy)]`)
|
||||
- all lints using both the `clippy` and `clippy_pedantic` lint groups (`#![deny(clippy)]`, `#![deny(clippy_pedantic)]`). Note that `clippy_pedantic` contains some very aggressive lints prone to false positives.
|
||||
|
|
Loading…
Reference in a new issue