mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Move lint definition generation into xtask/codegen
This commit is contained in:
parent
0964374274
commit
76463eee48
12 changed files with 90 additions and 86 deletions
|
@ -9,14 +9,20 @@ use crate::{flags, project_root};
|
|||
|
||||
pub(crate) mod assists_doc_tests;
|
||||
pub(crate) mod diagnostics_docs;
|
||||
mod lints;
|
||||
|
||||
impl flags::Codegen {
|
||||
pub(crate) fn run(self, _sh: &Shell) -> anyhow::Result<()> {
|
||||
match self.codegen_type.unwrap_or_default() {
|
||||
flags::CodegenType::All => {
|
||||
diagnostics_docs::generate(self.check);
|
||||
assists_doc_tests::generate(self.check);
|
||||
// lints::generate(self.check) Updating clones the rust repo, so don't run it unless
|
||||
// explicitly asked for
|
||||
}
|
||||
flags::CodegenType::AssistsDocTests => assists_doc_tests::generate(self.check),
|
||||
flags::CodegenType::DiagnosticsDocs => diagnostics_docs::generate(self.check),
|
||||
flags::CodegenType::LintDefinitions => lints::generate(self.check),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue