Skip to content

Commit ee6becc

Browse files
bors[bot]flipbit03
andauthored
Merge #11891
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 <[email protected]>
2 parents b5eaf56 + 84cf6ad commit ee6becc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/flycheck/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ impl CargoActor {
329329
Ok(output) if output.status.success() => Ok(()),
330330
Ok(output) => {
331331
Err(io::Error::new(io::ErrorKind::Other, format!(
332-
"Cargo watcher failed, the command produced no valid metadata (exit code: {:?})",
333-
output.status
332+
"Cargo watcher failed, the command produced no valid metadata (exit code: {:?})\nCargo's stderr output:\n{}",
333+
output.status, error
334334
)))
335335
}
336336
Err(e) => Err(io::Error::new(e.kind(), format!("{:?}: {}", e, error))),

0 commit comments

Comments
 (0)