diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2025-04-23 20:04:35 -0400 |
|---|---|---|
| committer | Jason Newcomb <jsnewcomb@pm.me> | 2025-06-18 22:37:23 -0400 |
| commit | acd8810e77fd3ee8362ce70ce195ae7c8bd08f25 (patch) | |
| tree | 1f6d9e0c895f3c955391eff0d4921629da6808cb /src | |
| parent | 19c1c709054ea1964d942259c5c33ad6489cd1e0 (diff) | |
Prepare to split lints into multiple crates
* Move `declare_clippy_lint` to it's own crate * Move lint/group registration into the driver * Make `dev update_lints` handle multiple lint crates
Diffstat (limited to 'src')
| -rw-r--r-- | src/driver.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/driver.rs b/src/driver.rs index 37adb14169a..202c74413cf 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -14,6 +14,7 @@ extern crate rustc_session; extern crate rustc_span; use clippy_utils::sym; +use declare_clippy_lint::LintListBuilder; use rustc_interface::interface; use rustc_session::EarlyDiagCtxt; use rustc_session::config::ErrorOutputType; @@ -151,8 +152,13 @@ impl rustc_driver::Callbacks for ClippyCallbacks { (previous)(sess, lint_store); } + let mut list_builder = LintListBuilder::default(); + list_builder.insert(clippy_lints::declared_lints::LINTS); + list_builder.register(lint_store); + let conf = clippy_config::Conf::read(sess, &conf_path); - clippy_lints::register_lints(lint_store, conf); + clippy_lints::register_lint_passes(lint_store, conf); + #[cfg(feature = "internal")] clippy_lints_internal::register_lints(lint_store); })); |
