diff --git a/Cargo.lock b/Cargo.lock index 67ad7f6510..5b28e2e6f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1803,9 +1803,9 @@ dependencies = [ [[package]] name = "quick-junit" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc1a6a5406a114913df2df8507998c755311b55b78584bed5f6e88f6417c4d4" +checksum = "62ffd2f9a162cfae131bed6d9d1ed60adced33be340a94f96952897d7cb0c240" dependencies = [ "chrono", "indexmap", @@ -1818,9 +1818,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index f7e93da531..ed43887010 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -102,7 +102,7 @@ pep440_rs = { version = "0.6.0", features = ["serde"] } pretty_assertions = "1.3.0" proc-macro2 = { version = "1.0.79" } pyproject-toml = { version = "0.9.0" } -quick-junit = { version = "0.4.0" } +quick-junit = { version = "0.5.0" } quote = { version = "1.0.23" } rand = { version = "0.8.5" } rayon = { version = "1.10.0" } diff --git a/crates/ruff_linter/src/message/junit.rs b/crates/ruff_linter/src/message/junit.rs index 05a48e0a0d..7c7e341809 100644 --- a/crates/ruff_linter/src/message/junit.rs +++ b/crates/ruff_linter/src/message/junit.rs @@ -1,7 +1,7 @@ use std::io::Write; use std::path::Path; -use quick_junit::{NonSuccessKind, Report, TestCase, TestCaseStatus, TestSuite}; +use quick_junit::{NonSuccessKind, Report, TestCase, TestCaseStatus, TestSuite, XmlString}; use ruff_source_file::SourceLocation; @@ -25,7 +25,7 @@ impl Emitter for JunitEmitter { let mut test_suite = TestSuite::new("ruff"); test_suite .extra - .insert("package".to_string(), "org.ruff".to_string()); + .insert(XmlString::new("package"), XmlString::new("org.ruff")); let mut case = TestCase::new("No errors found", TestCaseStatus::success()); case.set_classname("ruff"); test_suite.add_test_case(case); @@ -35,7 +35,7 @@ impl Emitter for JunitEmitter { let mut test_suite = TestSuite::new(filename); test_suite .extra - .insert("package".to_string(), "org.ruff".to_string()); + .insert(XmlString::new("package"), XmlString::new("org.ruff")); for message in messages { let MessageWithLocation { @@ -70,10 +70,14 @@ impl Emitter for JunitEmitter { let file_stem = file_path.file_stem().unwrap().to_str().unwrap(); let classname = file_path.parent().unwrap().join(file_stem); case.set_classname(classname.to_str().unwrap()); - case.extra - .insert("line".to_string(), location.row.to_string()); - case.extra - .insert("column".to_string(), location.column.to_string()); + case.extra.insert( + XmlString::new("line"), + XmlString::new(location.row.to_string()), + ); + case.extra.insert( + XmlString::new("column"), + XmlString::new(location.column.to_string()), + ); test_suite.add_test_case(case); }