From e02b9d9b7381385721466677f6c80bf340aae9ae Mon Sep 17 00:00:00 2001 From: Kevin K Date: Tue, 25 Aug 2015 10:30:56 -0400 Subject: [PATCH] feat: uses clippy to lint dev builds --- Cargo.toml | 5 +++++ src/main.rs | 4 ++++ 2 files changed, 9 insertions(+) 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")]