diff --git a/Cargo.toml b/Cargo.toml index 82a2e71bb2b..b572aebdbbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,4 +58,3 @@ rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"} [features] deny-warnings = [] -debugging = [] diff --git a/appveyor.yml b/appveyor.yml index 075c519cd4b..bf6133e98a0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,10 +37,10 @@ install: build: false build_script: - - cargo build --features debugging + - cargo build --features deny-warnings test_script: - - cargo test --features debugging + - cargo test --features deny-warnings notifications: - provider: Email diff --git a/ci/base-tests.sh b/ci/base-tests.sh index 4a64b19d80a..d3fd262b600 100755 --- a/ci/base-tests.sh +++ b/ci/base-tests.sh @@ -12,12 +12,12 @@ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then remark -f ./*.md -f doc/*.md > /dev/null fi # build clippy in debug mode and run tests -cargo build --features "debugging deny-warnings" -cargo test --features "debugging deny-warnings" +cargo build --features deny-warnings +cargo test --features deny-warnings -(cd clippy_lints && cargo test) -(cd rustc_tools_util && cargo test) -(cd clippy_dev && cargo test) +(cd clippy_lints && cargo test --features deny-warnings) +(cd rustc_tools_util && cargo test --features deny-warnings) +(cd clippy_dev && cargo test --features deny-warnings) # make sure clippy can be called via ./path/to/cargo-clippy ( diff --git a/clippy_dev/Cargo.toml b/clippy_dev/Cargo.toml index e2e946d06f2..b30ba61d299 100644 --- a/clippy_dev/Cargo.toml +++ b/clippy_dev/Cargo.toml @@ -11,3 +11,6 @@ regex = "1" lazy_static = "1.0" shell-escape = "0.1" walkdir = "2" + +[features] +deny-warnings = [] diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs index 327774ea0f2..f73e7b86720 100644 --- a/clippy_dev/src/lib.rs +++ b/clippy_dev/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(feature = "deny-warnings", deny(warnings))] + use itertools::Itertools; use lazy_static::lazy_static; use regex::Regex; diff --git a/clippy_dev/src/main.rs b/clippy_dev/src/main.rs index 9c9d3eae588..3010e0d2489 100644 --- a/clippy_dev/src/main.rs +++ b/clippy_dev/src/main.rs @@ -1,3 +1,5 @@ +#![cfg_attr(feature = "deny-warnings", deny(warnings))] + extern crate clap; extern crate clippy_dev; extern crate regex; diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index 608fb668c5a..dae403cbb4f 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -35,4 +35,4 @@ semver = "0.9.0" url = { version = "2.1.0", features = ["serde"] } [features] -debugging = [] +deny-warnings = [] diff --git a/rustc_tools_util/Cargo.toml b/rustc_tools_util/Cargo.toml index 5d37f935375..6f0fc5bee8f 100644 --- a/rustc_tools_util/Cargo.toml +++ b/rustc_tools_util/Cargo.toml @@ -9,4 +9,8 @@ license = "MIT OR Apache-2.0" keywords = ["rustc", "tool", "git", "version", "hash"] categories = ["development-tools"] edition = "2018" + [dependencies] + +[features] +deny-warnings = [] diff --git a/rustc_tools_util/src/lib.rs b/rustc_tools_util/src/lib.rs index 36b58a398dc..ff2a7de5725 100644 --- a/rustc_tools_util/src/lib.rs +++ b/rustc_tools_util/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(feature = "deny-warnings", deny(warnings))] + use std::env; #[macro_export]