Add clippy as an optional dependency (enabled via `cargo build --features clippy`)

This commit is contained in:
Josh Holmer 2017-01-11 09:10:10 -05:00
parent b109bb41ff
commit 18624ddf1d
6 changed files with 22 additions and 0 deletions

View File

@ -18,6 +18,10 @@ plugin = true
rocket = { version = "0.1.4", path = "../lib/" }
log = "^0.3"
[dependencies.clippy]
version = ">=0.0.106"
optional = true
[dev-dependencies]
compiletest_rs = "^0.2"

View File

@ -95,6 +95,9 @@
#![feature(i128_type)]
#![allow(unused_attributes)]
#![allow(deprecated)]
#![cfg_attr(feature="clippy", feature(plugin))]
#![cfg_attr(feature="clippy", plugin(clippy))]
#![cfg_attr(feature="clippy", allow(needless_lifetimes))]
#[macro_use] extern crate syntax;
#[macro_use] extern crate log;

View File

@ -33,3 +33,7 @@ handlebars = { version = "^0.23", optional = true, features = ["serde_type"] }
glob = { version = "^0.2", optional = true }
lazy_static = { version = "^0.2", optional = true }
tera = { version = "^0.6", optional = true }
[dependencies.clippy]
version = ">=0.0.106"
optional = true

View File

@ -29,6 +29,10 @@
//! This crate is expected to grow with time, bringing in outside crates to be
//! officially supported by Rocket.
#![cfg_attr(feature="clippy", feature(plugin))]
#![cfg_attr(feature="clippy", plugin(clippy))]
#![cfg_attr(feature="clippy", allow(needless_lifetimes))]
#[macro_use] extern crate log;
#[macro_use] extern crate rocket;

View File

@ -20,6 +20,10 @@ url = "^1"
toml = "^0.2"
# cookie = "^0.3"
[dependencies.clippy]
version = ">=0.0.106"
optional = true
[dependencies.hyper]
version = "^0.9"
default-features = false

View File

@ -4,6 +4,9 @@
#![feature(associated_consts)]
#![feature(const_fn)]
#![feature(type_ascription)]
#![cfg_attr(feature="clippy", feature(plugin))]
#![cfg_attr(feature="clippy", plugin(clippy))]
#![cfg_attr(feature="clippy", allow(needless_lifetimes))]
//! # Rocket - Core API Documentation
//!