Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
semicoleon opened this issue Oct 10, 2021 · 0 comments · Fixed by #10517

Comments

@semicoleon
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant