Clarify readme

This commit is contained in:
Manish Goregaokar 2016-02-13 08:45:36 +05:30
parent 17b7b413f7
commit d4ebd68df2

View file

@ -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.