mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Include individual path checks in --verbose logging (#3489)
This commit is contained in:
parent
a6e998d639
commit
1e5db58b7b
4 changed files with 6 additions and 7 deletions
|
@ -54,7 +54,7 @@ pub fn add_noqa(
|
|||
match add_noqa_to_path(path, package, settings) {
|
||||
Ok(count) => Some(count),
|
||||
Err(e) => {
|
||||
error!("Failed to add noqa to {}: {e}", path.to_string_lossy());
|
||||
error!("Failed to add noqa to {}: {e}", path.display());
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,10 +44,7 @@ pub fn run(
|
|||
if cache.into() {
|
||||
fn init_cache(path: &std::path::Path) {
|
||||
if let Err(e) = cache::init(path) {
|
||||
error!(
|
||||
"Failed to initialize cache at {}: {e:?}",
|
||||
path.to_string_lossy()
|
||||
);
|
||||
error!("Failed to initialize cache at {}: {e:?}", path.display());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ pub fn lint_path(
|
|||
if let Some(messages) =
|
||||
cache::get(path, package.as_ref(), &metadata, settings, autofix.into())
|
||||
{
|
||||
debug!("Cache hit for: {}", path.to_string_lossy());
|
||||
debug!("Cache hit for: {}", path.display());
|
||||
return Ok(Diagnostics::new(messages));
|
||||
}
|
||||
Some(metadata)
|
||||
|
@ -82,6 +82,8 @@ pub fn lint_path(
|
|||
None
|
||||
};
|
||||
|
||||
debug!("Checking: {}", path.display());
|
||||
|
||||
// Read the file from disk.
|
||||
let contents = std::fs::read_to_string(path)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue