Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 397561f

Browse files
committed
Use clippy_lints::read_conf
This should crawl the FS and use the default Clippy config file (e.g. clippy.toml)
1 parent 30feab2 commit 397561f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/build/rustc.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use crate::build::{BufWriter, BuildResult};
2929
use crate::config::{ClippyPreference, Config};
3030

3131
use std::collections::HashMap;
32-
use std::default::Default;
3332
use std::ffi::OsString;
3433
use std::io;
3534
use std::path::{Path, PathBuf};
@@ -161,9 +160,8 @@ fn clippy_after_parse_callback(state: &mut ::rustc_driver::driver::CompileState<
161160
);
162161
registry.args_hidden = Some(Vec::new());
163162

164-
// TODO handle clippy toml config
165-
let empty_clippy_conf = clippy_lints::Conf::default();
166-
clippy_lints::register_plugins(&mut registry, &empty_clippy_conf);
163+
let conf = clippy_lints::read_conf(&registry);
164+
clippy_lints::register_plugins(&mut registry, &conf);
167165

168166
let Registry {
169167
early_lint_passes,

0 commit comments

Comments
 (0)