mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 09:03:18 +00:00
Ignore unfulfilled_lint_expectations in metadata collection
This commit is contained in:
parent
aa033440da
commit
6edf0b4f36
1 changed files with 5 additions and 4 deletions
|
@ -21,7 +21,7 @@ fn dogfood_clippy() {
|
||||||
|
|
||||||
// "" is the root package
|
// "" is the root package
|
||||||
for package in &["", "clippy_dev", "clippy_lints", "clippy_utils", "rustc_tools_util"] {
|
for package in &["", "clippy_dev", "clippy_lints", "clippy_utils", "rustc_tools_util"] {
|
||||||
run_clippy_for_package(package);
|
run_clippy_for_package(package, &[]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ fn run_metadata_collection_lint() {
|
||||||
|
|
||||||
// Run collection as is
|
// Run collection as is
|
||||||
std::env::set_var("ENABLE_METADATA_COLLECTION", "1");
|
std::env::set_var("ENABLE_METADATA_COLLECTION", "1");
|
||||||
run_clippy_for_package("clippy_lints");
|
run_clippy_for_package("clippy_lints", &["-A", "unfulfilled_lint_expectations"]);
|
||||||
|
|
||||||
// Check if cargo caching got in the way
|
// Check if cargo caching got in the way
|
||||||
if let Ok(file) = File::open(metadata_output_path) {
|
if let Ok(file) = File::open(metadata_output_path) {
|
||||||
|
@ -61,10 +61,10 @@ fn run_metadata_collection_lint() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// Running the collection again
|
// Running the collection again
|
||||||
run_clippy_for_package("clippy_lints");
|
run_clippy_for_package("clippy_lints", &["-A", "unfulfilled_lint_expectations"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_clippy_for_package(project: &str) {
|
fn run_clippy_for_package(project: &str, args: &[&str]) {
|
||||||
let root_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
let root_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
|
|
||||||
let mut command = Command::new(&*test_utils::CARGO_CLIPPY_PATH);
|
let mut command = Command::new(&*test_utils::CARGO_CLIPPY_PATH);
|
||||||
|
@ -76,6 +76,7 @@ fn run_clippy_for_package(project: &str) {
|
||||||
.arg("--all-targets")
|
.arg("--all-targets")
|
||||||
.arg("--all-features")
|
.arg("--all-features")
|
||||||
.arg("--")
|
.arg("--")
|
||||||
|
.args(args)
|
||||||
.args(&["-D", "clippy::all"])
|
.args(&["-D", "clippy::all"])
|
||||||
.args(&["-D", "clippy::pedantic"])
|
.args(&["-D", "clippy::pedantic"])
|
||||||
.arg("-Cdebuginfo=0"); // disable debuginfo to generate less data in the target dir
|
.arg("-Cdebuginfo=0"); // disable debuginfo to generate less data in the target dir
|
||||||
|
|
Loading…
Reference in a new issue