Skip to content

Commit 26e9dcd

Browse files
committed
Merge pull request rust-lang#655 from Manishearth/clearer-readme
Clarify readme
2 parents 17b7b41 + 9fd1745 commit 26e9dcd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#rust-clippy
22
[![Build Status](https://travis-ci.org/Manishearth/rust-clippy.svg?branch=master)](https://travis-ci.org/Manishearth/rust-clippy)
3+
[![Current Version](http://meritbadge.herokuapp.com/optional)](https://crates.io/crates/clippy)
4+
[![License: MIT/Apache](https://img.shields.io/crates/l/clippy.svg)](#License)
35

46
A collection of lints to catch common mistakes and improve your Rust code.
57

@@ -143,7 +145,7 @@ Add in your `Cargo.toml`:
143145
clippy = "*"
144146
```
145147

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

148150
Sample `main.rs`:
149151
```rust
@@ -172,6 +174,9 @@ src/main.rs:8:5: 11:6 help: Try
172174
if let Some(y) = x { println!("{:?}", y) }
173175
```
174176

177+
178+
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.
179+
175180
You can add options to `allow`/`warn`/`deny`:
176181
- the whole set of `Warn` lints using the `clippy` lint group (`#![deny(clippy)]`)
177182
- 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)