INNER CODE UNIT · Rust
normalize_diagnostic
stjude-rust-labs/sprocket · crates/gauntlet/src/lib.rs:134
pub fn normalize_diagnostic(s: &str) -> String {
let s = s.replace('\\', "/").replace("\r\n", "\n");
// Handle OS-specific error messages
let s = s.replace(
"The system cannot find the file specified. (os error 2)",
"No such file or directory (os error 2)",
);
// Also handle Windows "path not found" error
s.replace(
"The system cannot find the path specified. (os error 3)",
"No such file or directory (os error 2)",
)
}
/// Main function for this subcommand.
pub async fn gauntlet(args: Args) -> Result<()> {