From 227fa4e035fa0d0e0a7f6a84e61445a77f500ab4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 06:58:58 +0000 Subject: [PATCH] Update Rust crate quick-junit to 0.5.0 (#13203) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [quick-junit](https://redirect.github.com/nextest-rs/quick-junit) | workspace.dependencies | minor | `0.4.0` -> `0.5.0` | --- ### Release Notes
nextest-rs/quick-junit (quick-junit) ### [`v0.5.0`](https://redirect.github.com/nextest-rs/quick-junit/blob/HEAD/CHANGELOG.md#050---2024-09-01) [Compare Source](https://redirect.github.com/nextest-rs/quick-junit/compare/quick-junit-0.4.0...quick-junit-0.5.0) ##### Changed - The `Output` type, which strips invalid XML characters from a string, has been renamed to `XmlString`. - All internal storage now uses `XmlString` rather than `String`.
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/ruff). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dhruv Manilawala --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- crates/ruff_linter/src/message/junit.rs | 18 +++++++++++------- 3 files changed, 16 insertions(+), 12 deletions(-) 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); }