Skip to content

Commit

Permalink
Merge #11891
Browse files Browse the repository at this point in the history
11891: Better error message on Flycheck Error message (from: unactionable error message if we are using `clippy` as the checker) r=Veykril a=flipbit03

I have commented on this [S-unactionable issue](#6589) that the Flycheck error message should maybe provide a hint about what tool it actually runs. Searching on some places on the Internet I've found multiple people, including myself, losing copious amounts of time on the same issue. So I've decided to make this very small PR :-)

From an user experience standpoint, the current error message is unhelpful to the end user, because the end user does not know exactly what it needs to check/fix (outdated, broken, or missing `cargo clippy`). In my own case, `cargo clippy` was actually missing altogether (developing off `rust:1.59.0-bullseye` official Docker image).

Thanks in advance!




Co-authored-by: Cadu <cadu.coelho@gmail.com>
  • Loading branch information
bors[bot] and flipbit03 authored Apr 5, 2022
2 parents b5eaf56 + 84cf6ad commit ee6becc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/flycheck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ impl CargoActor {
Ok(output) if output.status.success() => Ok(()),
Ok(output) => {
Err(io::Error::new(io::ErrorKind::Other, format!(
"Cargo watcher failed, the command produced no valid metadata (exit code: {:?})",
output.status
"Cargo watcher failed, the command produced no valid metadata (exit code: {:?})\nCargo's stderr output:\n{}",
output.status, error
)))
}
Err(e) => Err(io::Error::new(e.kind(), format!("{:?}: {}", e, error))),
Expand Down

0 comments on commit ee6becc

Please sign in to comment.