From 8406ca6d5eeee740d1fa64d57484822b25f169da Mon Sep 17 00:00:00 2001 From: Canop Date: Mon, 19 Jun 2023 19:49:06 +0200 Subject: [PATCH] version 2.9.0 --- CHANGELOG.md | 4 +++- Cargo.lock | 2 +- Cargo.toml | 2 +- src/line_analysis.rs | 12 ++++-------- src/report.rs | 5 ++++- src/tty.rs | 9 +++++---- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0307af8..e62974f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ -### next + +### v2.9.0 - 2023/06/19 - export format and path can now be configured - default export format includes error/warning summary (nvim-bacon has been updated in parallel) - Fix #127 - fix output non scrollable when non parsable +- fix test non parsed when styled and sent to stdout instead of stderr #137 ### v2.8.1 - 2023/04/22 diff --git a/Cargo.lock b/Cargo.lock index 5df519f..7e28bc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,7 +90,7 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bacon" -version = "2.9.0-dev" +version = "2.9.0" dependencies = [ "anyhow", "cargo_metadata", diff --git a/Cargo.toml b/Cargo.toml index 8f2ac7c..774d077 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bacon" -version = "2.9.0-dev" +version = "2.9.0" authors = ["dystroy "] repository = "https://github.com/Canop/bacon" description = "background rust compiler" diff --git a/src/line_analysis.rs b/src/line_analysis.rs index c888132..97be7d5 100644 --- a/src/line_analysis.rs +++ b/src/line_analysis.rs @@ -65,7 +65,7 @@ impl From<&CommandOutputLine> for LineAnalysis { ("", title_raw, CSI_BOLD_BLUE, "--> ") if is_spaces(title_raw) => { LineType::Location } - ("", k, CSI_BOLD_RED|CSI_RED, "FAILED") if content.strings.len() == 2 => { + ("", k, CSI_BOLD_RED | CSI_RED, "FAILED") if content.strings.len() == 2 => { if let Some(k) = as_test_name(k) { key = Some(k.to_string()); LineType::TestResult(false) @@ -115,17 +115,13 @@ fn is_n_warnings_emitted(s: &str) -> bool { regex_is_match!(r#"^: \d+ warnings? emitted"#, s) } fn is_generated_n_warnings(ts: &[TString]) -> bool { - ts.iter().any(|ts| { - regex_is_match!(r#"generated \d+ warnings?$"#, &ts.raw) - }) + ts.iter() + .any(|ts| regex_is_match!(r#"generated \d+ warnings?$"#, &ts.raw)) } fn is_build_failed(ts: Option<&TString>) -> bool { - ts.map_or(false, |ts| { - regex_is_match!(r#"^\s*build failed"#, &ts.raw) - }) + ts.map_or(false, |ts| regex_is_match!(r#"^\s*build failed"#, &ts.raw)) } - /// similar to as_test_result but without the FAILED|ok part /// This is used in case of styled output (because the FAILED|ok /// part is in another TString) diff --git a/src/report.rs b/src/report.rs index 34296fc..f4b25a4 100644 --- a/src/report.rs +++ b/src/report.rs @@ -60,7 +60,10 @@ impl Report { line_type, content: cmd_line.content.clone(), }; - debug!("{:?}> [{line_type:?}][{:?}]", cmd_line.origin, line_analysis.key); + debug!( + "{:?}> [{line_type:?}][{:?}]", + cmd_line.origin, line_analysis.key + ); match (line_type, line_analysis.key) { (LineType::TestResult(r), Some(key)) => { if r { diff --git a/src/tty.rs b/src/tty.rs index c24cf5e..9b49f73 100644 --- a/src/tty.rs +++ b/src/tty.rs @@ -250,10 +250,11 @@ impl TLine { None } } - pub fn has(&self, part: &str) -> bool { - self.strings - .iter() - .any(|s| s.raw.contains(part)) + pub fn has( + &self, + part: &str, + ) -> bool { + self.strings.iter().any(|s| s.raw.contains(part)) } }