]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #12326 - jonas-schievink:add-clippy-task-preset, r=jonas-schievink
authorbors <bors@rust-lang.org>
Fri, 20 May 2022 13:36:59 +0000 (13:36 +0000)
committerbors <bors@rust-lang.org>
Fri, 20 May 2022 13:36:59 +0000 (13:36 +0000)
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


Trivial merge