From d4ebd68df2d1a4511ab26adc4850fd66f2343e37 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 13 Feb 2016 08:45:36 +0530 Subject: [PATCH 1/2] Clarify readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c2d3b16074cc..e42d3717e16c 100644 --- a/README.md +++ b/README.md @@ -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. From 9fd1745db6d2fef9f1551824bdfa14cccf6f5fe0 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 13 Feb 2016 17:38:08 +0530 Subject: [PATCH 2/2] +license --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e42d3717e16c..524a2d18ddde 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ #rust-clippy [![Build Status](https://travis-ci.org/Manishearth/rust-clippy.svg?branch=master)](https://travis-ci.org/Manishearth/rust-clippy) +[![Current Version](http://meritbadge.herokuapp.com/optional)](https://crates.io/crates/clippy) +[![License: MIT/Apache](https://img.shields.io/crates/l/clippy.svg)](#License) A collection of lints to catch common mistakes and improve your Rust code.