Skip to content

Setting rust-analyzer.checkOnSave.command to "clippy" causes silent failures if clippy is not installed for the current toolchain #10515

Closed
@semicoleon

Description

@semicoleon

rust-analyzer versions:
- ce86534 2021-10-10 nightly
- 4b7675f 2021-10-04 stable

rust toolchains
- stable-x86_64-pc-windows-msvc unchanged - rustc 1.55.0 (c8dfcfe04 2021-09-06)
- nightly-x86_64-pc-windows-msvc unchanged - rustc 1.57.0-nightly (54bb4fec6 2021-10-08)

This appears to work for basically any crate, I can reproduce it with a new empty crate by adding a trait to main.rs and implementing it incorrectly

pub trait Trait {
    fn method();
}

// This impl should produce an error
impl Trait for () {}

fn main() {}

If clippy is not installed RA appears to indicate there are no errors. Some basic syntax errors still show up. Installing clippy with rustup component add clippy or setting rust-analyzer.checkOnSave.command back to "check" both resolve the issue.

I think RA should show some kind of error when the command isn't found. It's possible there's an error in a log somewhere but I wasn't able to track it down quickly if so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions