Normalize UI container violation paths across platforms

Report repository-relative paths with forward slashes so diagnostics and the existing nested-package regression assertions agree on Windows and Unix. Keep the container detection rules unchanged.

Validation: official ui-containers gate and all seven focused xtask tests passed; rustfmt and diff checks passed. Only xtask/dependencies were compiled; no application build or heavy tests.
This commit is contained in:
Victor Santos Oliveira
2026-10-22 01:10:03 -03:00
parent 0d90883992
commit 44b58d8e10
+2 -1
View File
@@ -325,7 +325,8 @@ pub fn run(root: &Path) -> Result<(), String> {
let source = std::fs::read_to_string(&path).map_err(|e| format!("{}: {e}", path.display()))?;
let found = violations(&source).map_err(|e| format!("{}: {e}", path.display()))?;
if !found.is_empty() {
failures.push(format!("{}: {}", path.strip_prefix(root).unwrap_or(&path).display(), found.join(", ")));
let relative = path.strip_prefix(root).unwrap_or(&path).to_string_lossy().replace('\\', "/");
failures.push(format!("{relative}: {}", found.join(", ")));
}
}
}