Skip to content

Commit 1b65e00

Browse files
committed
Auto merge of rust-lang#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 rust-lang/rust-analyzer#12323
2 parents c73513f + c99a5ae commit 1b65e00

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

editors/code/src/tasks.ts

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class CargoTaskProvider implements vscode.TaskProvider {
3232
const defs = [
3333
{ command: "build", group: vscode.TaskGroup.Build },
3434
{ command: "check", group: vscode.TaskGroup.Build },
35+
{ command: "clippy", group: vscode.TaskGroup.Build },
3536
{ command: "test", group: vscode.TaskGroup.Test },
3637
{ command: "clean", group: vscode.TaskGroup.Clean },
3738
{ command: "run", group: undefined },

0 commit comments

Comments
 (0)