Skip to content

Commit

Permalink
version 2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed Jun 19, 2023
1 parent db482d1 commit 8406ca6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### next
<a name="v2.9.0"></a>
### 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

<a name="v2.8.1"></a>
### v2.8.1 - 2023/04/22
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bacon"
version = "2.9.0-dev"
version = "2.9.0"
authors = ["dystroy <[email protected]>"]
repository = "https://github.com/Canop/bacon"
description = "background rust compiler"
Expand Down
12 changes: 4 additions & 8 deletions src/line_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 5 additions & 4 deletions src/tty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down

0 comments on commit 8406ca6

Please sign in to comment.