diff options
author | Markus Unterwaditzer <markus@unterwaditzer.net> | 2016-02-20 19:48:22 +0100 |
---|---|---|
committer | Markus Unterwaditzer <markus@unterwaditzer.net> | 2016-02-20 19:48:22 +0100 |
commit | 37b60e25ceef2e7a5f596879932372fdfd7b4cf4 (patch) | |
tree | 812b6e5fe83799613a3d0dac3ef35e952ddd3635 | |
parent | 8d4971ef24b34d67ac91152aa6048de1d75362b6 (diff) |
Introduce clippy
-rw-r--r-- | Cargo.toml | 3 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | src/vobject/lib.rs | 5 |
3 files changed, 11 insertions, 0 deletions
@@ -15,3 +15,6 @@ license = "MIT" [lib] name = "vobject" path = "src/vobject/lib.rs" + +[dependencies] +clippy = {git = "https://github.com/Manishearth/rust-clippy", version = "*", optional = true} @@ -24,3 +24,6 @@ upload: echo '<!doctype html><title>rust-vobject</title><meta http-equiv="refresh" content="0; ./vobject/">' \ > ./target/doc/index.htm rsync -av --chmod=755 ./target/doc/ untispace:~/virtual/rust-vobject.unterwaditzer.net/ + +clippy: + cargo build --features=clippy diff --git a/src/vobject/lib.rs b/src/vobject/lib.rs index 04ce8e3..01cb2fd 100644 --- a/src/vobject/lib.rs +++ b/src/vobject/lib.rs @@ -1,5 +1,10 @@ // DOCS +#![cfg_attr(feature = "clippy", allow(unstable_features))] +#![cfg_attr(feature = "clippy", feature(plugin))] +#![cfg_attr(feature = "clippy", plugin(clippy))] +#![cfg_attr(feature = "clippy", deny(warnings))] + use std::collections::HashMap; use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::borrow::ToOwned; |