Skip to content

Commit d4ebd68

Browse files
committed
Clarify readme
1 parent 17b7b41 commit d4ebd68

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Add in your `Cargo.toml`:
143143
clippy = "*"
144144
```
145145

146-
You may also use [`cargo clippy`](https://github.com/arcnmx/cargo-clippy), a custom cargo subcommand that runs clippy on a given project.
146+
You then need to add `#![feature(plugin)]` and `#![plugin(clippy)]` to the top of your crate entry point (`main.rs` or `lib.rs`).
147147

148148
Sample `main.rs`:
149149
```rust
@@ -172,6 +172,9 @@ src/main.rs:8:5: 11:6 help: Try
172172
if let Some(y) = x { println!("{:?}", y) }
173173
```
174174

175+
176+
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.
177+
175178
You can add options to `allow`/`warn`/`deny`:
176179
- the whole set of `Warn` lints using the `clippy` lint group (`#![deny(clippy)]`)
177180
- 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.

0 commit comments

Comments
 (0)