diff --git a/Cargo.toml b/Cargo.toml index 60cfe5b..d01a662 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,8 +13,13 @@ regex = "~0.1.41" version = "~0.6.3" optional = true +[dependencies.clippy] +version = "~0.0.11" +optional = true + [features] default = ["color"] color = ["ansi_term"] debug = [] +lints = ["clippy", "unstable"] unstable = [] diff --git a/src/main.rs b/src/main.rs index 20bf7a8..87fd1a9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,7 @@ +#![cfg_attr(feature = "unstable", feature(plugin))] +#![cfg_attr(feature = "lints", plugin(clippy))] +#![cfg_attr(feature = "lints", deny(warnings))] + #[macro_use] extern crate clap; #[cfg(feature = "color")]