Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Make clippy an optional dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Feb 12, 2016
1 parent 23d2899 commit 486fa90
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ matrix:
fast_finish: true
include:
- rust: nightly
env: FEATURES="--features ethcore/json-tests" KCOV_FEATURES="" TARGETS="-p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity" ARCHIVE_SUFFIX="-${TRAVIS_OS_NAME}-${TRAVIS_TAG}"
env: FEATURES="--features ethcore/json-tests dev" KCOV_FEATURES="" TARGETS="-p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity" ARCHIVE_SUFFIX="-${TRAVIS_OS_NAME}-${TRAVIS_TAG}"
cache:
apt: true
directories:
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rustc-serialize = "0.3"
docopt = "0.6"
docopt_macros = "0.6"
ctrlc = { git = "https://github.com/tomusdrw/rust-ctrlc.git" }
clippy = "0.0.37"
clippy = { version = "0.0.38", optional = true }
ethcore-util = { path = "util" }
ethcore = { path = "ethcore" }
ethsync = { path = "sync" }
Expand All @@ -23,6 +23,7 @@ target_info = "0.1"
[features]
default = ["rpc"]
rpc = ["ethcore-rpc"]
dev = ["clippy", "ethcore/dev", "ethcore-util/dev", "ethsync/dev"]

[[bin]]
path = "parity/main.rs"
Expand Down
3 changes: 2 additions & 1 deletion ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ethcore-util = { path = "../util" }
evmjit = { path = "../evmjit", optional = true }
ethash = { path = "../ethash" }
num_cpus = "0.2"
clippy = "0.0.37"
clippy = { version = "0.0.38", optional = true }
crossbeam = "0.1.5"
lazy_static = "0.1"

Expand All @@ -27,3 +27,4 @@ jit = ["evmjit"]
evm-debug = []
json-tests = []
test-heavy = []
dev = ["clippy"]
4 changes: 2 additions & 2 deletions ethcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#![warn(missing_docs)]
#![feature(cell_extras)]
#![feature(augmented_assignments)]
#![feature(plugin)]
#![plugin(clippy)]
#![cfg_attr(feature="dev", feature(plugin))]
#![cfg_attr(feature="dev", plugin(clippy))]
#![allow(needless_range_loop, match_bool)]

//! Ethcore library
Expand Down
2 changes: 1 addition & 1 deletion parity/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#![warn(missing_docs)]
#![feature(plugin)]
#![plugin(docopt_macros)]
#![plugin(clippy)]
#![cfg_attr(feature="dev", plugin(clippy))]
extern crate docopt;
extern crate rustc_serialize;
extern crate ethcore_util as util;
Expand Down
6 changes: 5 additions & 1 deletion rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jsonrpc-http-server = "1.1"
ethcore-util = { path = "../util" }
ethcore = { path = "../ethcore" }
ethsync = { path = "../sync" }
clippy = "0.0.37"
clippy = { version = "0.0.38", optional = true }
target_info = "0.1.0"
rustc-serialize = "0.3"

[features]
default = []
dev = ["clippy", "ethcore/dev", "ethcore-util/dev", "ethsync/dev"]
2 changes: 1 addition & 1 deletion rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#![warn(missing_docs)]
#![feature(custom_derive, custom_attribute, plugin)]
#![plugin(serde_macros)]
#![plugin(clippy)]
#![cfg_attr(feature="dev", plugin(clippy))]

extern crate rustc_serialize;
extern crate target_info;
Expand Down
6 changes: 5 additions & 1 deletion sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ authors = ["Ethcore <admin@ethcore.io"]
[dependencies]
ethcore-util = { path = "../util" }
ethcore = { path = ".." }
clippy = "0.0.37"
clippy = { version = "0.0.38", 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"]
4 changes: 2 additions & 2 deletions sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

#![warn(missing_docs)]
#![feature(plugin)]
#![plugin(clippy)]
#![cfg_attr(feature="dev", feature(plugin))]
#![cfg_attr(feature="dev", plugin(clippy))]
#![feature(augmented_assignments)]
//! Blockchain sync module
//! Implements ethereum protocol version 63 as specified here:
Expand Down
6 changes: 5 additions & 1 deletion util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ crossbeam = "0.2"
slab = { git = "https://github.com/arkpar/slab.git" }
sha3 = { path = "sha3" }
serde = "0.6.7"
clippy = "0.0.37"
clippy = { version = "0.0.38", optional = true }
json-tests = { path = "json-tests" }
target_info = "0.1.0"
igd = "0.4.2"

[features]
default = []
dev = ["clippy"]
4 changes: 2 additions & 2 deletions util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#![feature(op_assign_traits)]
#![feature(augmented_assignments)]
#![feature(associated_consts)]
#![feature(plugin)]
#![plugin(clippy)]
#![cfg_attr(feature="dev", feature(plugin))]
#![cfg_attr(feature="dev", plugin(clippy))]
#![allow(needless_range_loop, match_bool)]
#![feature(catch_panic)]

Expand Down

0 comments on commit 486fa90

Please sign in to comment.