diff options
| author | bors <bors@rust-lang.org> | 2022-05-20 13:36:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-20 13:36:59 +0000 |
| commit | 1b65e00aeaa16e0a7478053c7f6a3f6fc0234235 (patch) | |
| tree | c17298fea4a63159e609684c2236b2af4ad39457 | |
| parent | c73513f211aa9e65d0bacfad9210fda7b1dea42e (diff) | |
| parent | c99a5ae312d12f1ed8290ae89484a087b16edb8e (diff) | |
| download | rust-1b65e00aeaa16e0a7478053c7f6a3f6fc0234235.tar.gz rust-1b65e00aeaa16e0a7478053c7f6a3f6fc0234235.zip | |
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
| -rw-r--r-- | editors/code/src/tasks.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/editors/code/src/tasks.ts b/editors/code/src/tasks.ts index 8aa6bcee192..e6239deeb21 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 }, |
