Skip to content

Commit

Permalink
Merge branch 'main' into charlie/continuation
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Feb 11, 2023
2 parents 2c62b44 + 86d0749 commit 6669326
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/ruff_cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ pub fn run(
}
.unwrap_or_else(|(path, message)| {
if let Some(path) = &path {
error!(
"{}{}{} {message}",
"Failed to lint ".bold(),
fs::relativize_path(path).bold(),
":".bold()
);
let settings = resolver.resolve(path, pyproject_strategy);
if settings.rules.enabled(&Rule::IOError) {
Diagnostics::new(vec![Message {
Expand All @@ -120,11 +126,10 @@ pub fn run(
source: None,
}])
} else {
error!("Failed to check {}: {message}", path.to_string_lossy());
Diagnostics::default()
}
} else {
error!("{message}");
error!("{} {message}", "Encountered error:".bold());
Diagnostics::default()
}
})
Expand Down

0 comments on commit 6669326

Please sign in to comment.