diff --git a/.travis.yml b/.travis.yml index 5cd9bf7..63a1a1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,8 @@ before_script: script: - cargo fmt -- --write-mode=diff - - travis-cargo build + - travis-cargo --skip nightly build + - travis-cargo --only nightly build -- --features "clippy" - travis-cargo --only stable doc -- --no-deps after_success: diff --git a/Cargo.toml b/Cargo.toml index 47eeab4..025a343 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ wayland-server = "0.8.4" nix = "0.7.0" slog = { version = "~1.5.2", features = ["max_level_trace", "release_max_level_info"] } slog-stdlog = "~1.1.0" +clippy = { version = "*", optional = true } [dev-dependencies] slog-term = "~1.5" diff --git a/src/lib.rs b/src/lib.rs index 3a7d7aa..b4eed74 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,8 @@ #![warn(missing_docs)] +#![cfg_attr(feature = "clippy", feature(plugin))] +#![cfg_attr(feature = "clippy", plugin(clippy))] + #[macro_use] extern crate wayland_server; extern crate nix;