Make clippy an optional dependency

This commit is contained in:
Manish Goregaokar
2016-02-13 02:31:23 +05:30
parent 50b6c6d4ad
commit 8802fb2fd8
12 changed files with 28 additions and 19 deletions

View File

@@ -10,8 +10,12 @@ authors = ["Ethcore <admin@ethcore.io"]
[dependencies]
ethcore-util = { path = "../util" }
ethcore = { path = ".." }
clippy = "0.0.41"
clippy = { version = "0.0.41", optional = true }
log = "0.3"
env_logger = "0.3"
time = "0.1.34"
rand = "0.3.13"
[features]
default = []
dev = ["clippy", "ethcore/dev", "ethcore-util/dev"]

View File

@@ -15,9 +15,9 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
#![warn(missing_docs)]
#![feature(plugin)]
#![cfg_attr(feature="dev", feature(plugin))]
#![cfg_attr(feature="dev", plugin(clippy))]
#![feature(augmented_assignments)]
#![plugin(clippy)]
// Keeps consistency (all lines with `.clone()`) and helpful when changing ref to non-ref.
#![allow(clone_on_copy)]