aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen/gen_lint_completions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/codegen/gen_lint_completions.rs')
-rw-r--r--xtask/src/codegen/gen_lint_completions.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/xtask/src/codegen/gen_lint_completions.rs b/xtask/src/codegen/gen_lint_completions.rs
index 3b54b2489..54fcaa0e6 100644
--- a/xtask/src/codegen/gen_lint_completions.rs
+++ b/xtask/src/codegen/gen_lint_completions.rs
@@ -28,7 +28,7 @@ pub(crate) fn generate_lint_completions() -> Result<()> {
28 contents.push('\n'); 28 contents.push('\n');
29 29
30 cmd!("curl https://rust-lang.github.io/rust-clippy/master/lints.json --output ./target/clippy_lints.json").run()?; 30 cmd!("curl https://rust-lang.github.io/rust-clippy/master/lints.json --output ./target/clippy_lints.json").run()?;
31 generate_descriptor_clippy(&mut contents, &Path::new("./target/clippy_lints.json"))?; 31 generate_descriptor_clippy(&mut contents, Path::new("./target/clippy_lints.json"))?;
32 let contents = reformat(&contents)?; 32 let contents = reformat(&contents)?;
33 33
34 let destination = project_root().join("crates/ide_db/src/helpers/generated_lints.rs"); 34 let destination = project_root().join("crates/ide_db/src/helpers/generated_lints.rs");
@@ -140,8 +140,7 @@ fn generate_descriptor_clippy(buf: &mut String, path: &Path) -> Result<()> {
140 .expect("should be prefixed by what it does") 140 .expect("should be prefixed by what it does")
141 .strip_suffix(suffix_to_strip) 141 .strip_suffix(suffix_to_strip)
142 .map(unescape) 142 .map(unescape)
143 .expect("should be suffixed by comma") 143 .expect("should be suffixed by comma");
144 .into();
145 } 144 }
146 } 145 }
147 clippy_lints.sort_by(|lint, lint2| lint.id.cmp(&lint2.id)); 146 clippy_lints.sort_by(|lint, lint2| lint.id.cmp(&lint2.id));