mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Deny warning in every main sub-crate
This enables the same warnings that are enabled in `clippy_lints` also in `clippy_utils` and `clippy_dev`. Then it makes sure, that the `deny-warnings` feature is passed down to `clippy_lints` and `clippy_utils` when compiling Clippy.
This commit is contained in:
parent
213b8d9a2b
commit
ff452d5ba6
6 changed files with 15 additions and 3 deletions
|
@ -49,7 +49,7 @@ rustc-workspace-hack = "1.0.0"
|
|||
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util" }
|
||||
|
||||
[features]
|
||||
deny-warnings = []
|
||||
deny-warnings = ["clippy_lints/deny-warnings"]
|
||||
integration = ["tempfile"]
|
||||
internal-lints = ["clippy_lints/internal-lints"]
|
||||
metadata-collector-lint = ["internal-lints", "clippy_lints/metadata-collector-lint"]
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![feature(once_cell)]
|
||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
|
||||
use itertools::Itertools;
|
||||
use regex::Regex;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
use clippy_dev::{bless, fmt, ide_setup, new_lint, serve, stderr_length_check, update_lints};
|
||||
|
|
|
@ -30,7 +30,7 @@ rustc-semver = "1.1.0"
|
|||
url = { version = "2.1.0", features = ["serde"] }
|
||||
|
||||
[features]
|
||||
deny-warnings = []
|
||||
deny-warnings = ["clippy_utils/deny-warnings"]
|
||||
# build clippy with internal lints enabled, off by default
|
||||
internal-lints = ["clippy_utils/internal-lints"]
|
||||
metadata-collector-lint = ["serde_json", "clippy_utils/metadata-collector-lint"]
|
||||
|
|
|
@ -14,6 +14,7 @@ unicode-normalization = "0.1"
|
|||
rustc-semver="1.1.0"
|
||||
|
||||
[features]
|
||||
deny-warnings = []
|
||||
internal-lints = []
|
||||
metadata-collector-lint = []
|
||||
|
||||
|
|
|
@ -3,7 +3,14 @@
|
|||
#![feature(iter_zip)]
|
||||
#![feature(rustc_private)]
|
||||
#![recursion_limit = "512"]
|
||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![allow(clippy::missing_errors_doc, clippy::missing_panics_doc, clippy::must_use_candidate)]
|
||||
// warn on the same lints as `clippy_lints`
|
||||
#![warn(trivial_casts, trivial_numeric_casts)]
|
||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
// warn on rustc internal lints
|
||||
#![warn(rustc::internal)]
|
||||
|
||||
// FIXME: switch to something more ergonomic here, once available.
|
||||
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
|
||||
|
|
Loading…
Reference in a new issue