Skip to content

Commit 1ccd706

Browse files
authored
Merge pull request #1461 from yaahallo/rustup-clippy-driver
Add clippy to the tools list
2 parents 37c0a11 + 7553501 commit 1ccd706

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/rustup-cli/self_update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ tools, but otherwise, install the C++ build tools before proceeding.
190190
"#;
191191

192192
static TOOLS: &'static [&'static str] =
193-
&["rustc", "rustdoc", "cargo", "rust-lldb", "rust-gdb", "rls"];
193+
&["rustc", "rustdoc", "cargo", "rust-lldb", "rust-gdb", "rls", "cargo-clippy"];
194194

195195
// Tools which are commonly installed by Cargo as well as rustup. We take a bit
196196
// more care with these to ensure we don't overwrite the user's previous

src/rustup-win-installer/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ static TOOLS: &'static [&'static str] = &[
2626
"rls",
2727
"rustfmt",
2828
"cargo-fmt",
29+
"cargo-clippy",
2930
];
3031

3132
#[no_mangle]

tests/cli-self-upd.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,3 +1367,15 @@ fn update_does_not_overwrite_rustfmt() {
13671367
assert!(utils::file_size(rustfmt_path).unwrap() > 0);
13681368
});
13691369
}
1370+
1371+
#[test]
1372+
fn update_installs_clippy_cargo_and() {
1373+
update_setup(&|config, self_dist| {
1374+
expect_ok(config, &["rustup-init", "-y"]);
1375+
let version = env!("CARGO_PKG_VERSION");
1376+
output_release_file(self_dist, "1", version);
1377+
1378+
let ref cargo_clippy_path = config.cargodir.join(format!("bin/cargo-clippy{}", EXE_SUFFIX));
1379+
assert!(cargo_clippy_path.exists());
1380+
});
1381+
}

0 commit comments

Comments
 (0)