diff --git a/crates/ruff/src/noqa.rs b/crates/ruff/src/noqa.rs index 63b48c3e23fc7..a8f24d635514d 100644 --- a/crates/ruff/src/noqa.rs +++ b/crates/ruff/src/noqa.rs @@ -236,7 +236,7 @@ impl FileExemption { Err(err) => { #[allow(deprecated)] let line = locator.compute_line_index(range.start()); - let path_display = path.display(); + let path_display = relativize_path(path.display()); warn!("Invalid `# noqa` directive on {path_display}:{line}: {err}"); } Ok(Some(ParsedFileExemption::All)) => {