Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #12326 - jonas-schievink:add-clippy-task-preset, r=jonas-schievink
feat: Add "cargo clippy" task preset We've had a couple of common presets in `Tasks: Run Task -> cargo -> cargo [check,build,test,...]` before. This PR adds `cargo clippy` to that list, which makes for a convenient way of occasionally running Clippy on your code without having to reconfigure the Check on Save command to clippy. These presets all use the `cargo` task type that we provide, so diagnostics will show up in the editor. However, they don't go through the server-side parsing logic, so it's not possible to apply suggestions, and diagnostics are fairly "low-fidelity". It would be cool if we could somehow pass Cargo's JSON output through the LSP server and render it properly, for arbitrary tasks. cc https://github.com/rust-lang/rust-analyzer/issues/12323
bors 2022-05-20
parent c73513f · parent c99a5ae · commit 1b65e00
-rw-r--r--editors/code/src/tasks.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/editors/code/src/tasks.ts b/editors/code/src/tasks.ts
index 8aa6bcee19..e6239deeb2 100644
--- a/editors/code/src/tasks.ts
+++ b/editors/code/src/tasks.ts
@@ -32,6 +32,7 @@ class CargoTaskProvider implements vscode.TaskProvider {
const defs = [
{ command: "build", group: vscode.TaskGroup.Build },
{ command: "check", group: vscode.TaskGroup.Build },
+ { command: "clippy", group: vscode.TaskGroup.Build },
{ command: "test", group: vscode.TaskGroup.Test },
{ command: "clean", group: vscode.TaskGroup.Clean },
{ command: "run", group: undefined },