mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-11 22:53:00 +00:00
Fix warnings and stabilize dry-run snapshots
This commit is contained in:
parent
74b2c5c889
commit
b29e169da9
5 changed files with 30 additions and 26 deletions
|
|
@ -18,6 +18,7 @@ use crate::user_config::load_user_settings_with_globals;
|
|||
|
||||
use super::short_run_id;
|
||||
|
||||
#[allow(clippy::print_stdout)]
|
||||
pub(crate) async fn list_command(
|
||||
args: &RunsListArgs,
|
||||
styles: &Styles,
|
||||
|
|
@ -123,7 +124,6 @@ pub(crate) async fn list_command(
|
|||
.color_choice(color_choice)
|
||||
.border(Border::builder().build())
|
||||
.separator(Separator::builder().build());
|
||||
#[allow(clippy::print_stdout)]
|
||||
println!("{}", table.display()?);
|
||||
|
||||
eprintln!("\n{} run(s) listed.", display_runs.len());
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ pub(super) async fn df_command(args: &DfArgs, globals: &GlobalArgs) -> Result<()
|
|||
.await
|
||||
}
|
||||
|
||||
#[allow(clippy::print_stdout)]
|
||||
async fn df_from(
|
||||
args: &DfArgs,
|
||||
store: &dyn fabro_store::Store,
|
||||
|
|
@ -170,7 +171,6 @@ async fn df_from(
|
|||
.color_choice(color_choice)
|
||||
.border(Border::builder().build())
|
||||
.separator(Separator::builder().build());
|
||||
#[allow(clippy::print_stdout)]
|
||||
println!("{}", summary_table.display()?);
|
||||
|
||||
println!();
|
||||
|
|
@ -225,7 +225,6 @@ async fn df_from(
|
|||
.color_choice(color_choice)
|
||||
.border(Border::builder().build())
|
||||
.separator(Separator::builder().build());
|
||||
#[allow(clippy::print_stdout)]
|
||||
println!("{}", verbose_table.display()?);
|
||||
println!();
|
||||
println!("* = reclaimable");
|
||||
|
|
|
|||
|
|
@ -344,8 +344,8 @@ fn dry_run_simple() {
|
|||
=== Run Result ===
|
||||
Run: [ULID]
|
||||
Status: SUCCESS
|
||||
Duration: 0 seconds
|
||||
Run: [STORAGE_DIR]/runs/20260330-dry-run-[ULID]
|
||||
Duration: [DURATION]
|
||||
Run: [DRY_RUN_DIR]
|
||||
|
||||
=== Output ===
|
||||
[Simulated] Response for stage: report
|
||||
|
|
@ -379,8 +379,8 @@ fn dry_run_branching() {
|
|||
=== Run Result ===
|
||||
Run: [ULID]
|
||||
Status: SUCCESS
|
||||
Duration: 0 seconds
|
||||
Run: [STORAGE_DIR]/runs/20260330-dry-run-[ULID]
|
||||
Duration: [DURATION]
|
||||
Run: [DRY_RUN_DIR]
|
||||
|
||||
=== Output ===
|
||||
[Simulated] Response for stage: validate
|
||||
|
|
@ -411,8 +411,8 @@ fn dry_run_conditions() {
|
|||
=== Run Result ===
|
||||
Run: [ULID]
|
||||
Status: SUCCESS
|
||||
Duration: 0 seconds
|
||||
Run: [STORAGE_DIR]/runs/20260330-dry-run-[ULID]
|
||||
Duration: [DURATION]
|
||||
Run: [DRY_RUN_DIR]
|
||||
|
||||
=== Output ===
|
||||
[Simulated] Response for stage: path_b
|
||||
|
|
@ -444,8 +444,8 @@ fn dry_run_parallel() {
|
|||
=== Run Result ===
|
||||
Run: [ULID]
|
||||
Status: SUCCESS
|
||||
Duration: 0 seconds
|
||||
Run: [STORAGE_DIR]/runs/20260330-dry-run-[ULID]
|
||||
Duration: [DURATION]
|
||||
Run: [DRY_RUN_DIR]
|
||||
|
||||
=== Output ===
|
||||
[Simulated] Response for stage: review
|
||||
|
|
@ -477,8 +477,8 @@ fn dry_run_styled() {
|
|||
=== Run Result ===
|
||||
Run: [ULID]
|
||||
Status: SUCCESS
|
||||
Duration: 0 seconds
|
||||
Run: [STORAGE_DIR]/runs/20260330-dry-run-[ULID]
|
||||
Duration: [DURATION]
|
||||
Run: [DRY_RUN_DIR]
|
||||
|
||||
=== Output ===
|
||||
[Simulated] Response for stage: critical_review
|
||||
|
|
@ -508,8 +508,8 @@ fn dry_run_legacy_tool() {
|
|||
=== Run Result ===
|
||||
Run: [ULID]
|
||||
Status: SUCCESS
|
||||
Duration: 0 seconds
|
||||
Run: [STORAGE_DIR]/runs/20260330-dry-run-[ULID]
|
||||
Duration: [DURATION]
|
||||
Run: [DRY_RUN_DIR]
|
||||
");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,10 +178,7 @@ fn print_models_table(models: &[Model], s: &Styles) {
|
|||
.color_choice(color_choice(use_color))
|
||||
.border(Border::builder().build())
|
||||
.separator(Separator::builder().build());
|
||||
#[allow(clippy::print_stdout)]
|
||||
{
|
||||
println!("{}", table.display().unwrap());
|
||||
}
|
||||
println!("{}", table.display().unwrap());
|
||||
}
|
||||
|
||||
fn read_stdin_prompt() -> Option<String> {
|
||||
|
|
@ -1000,7 +997,6 @@ async fn test_models_via_server(
|
|||
.color_choice(color_choice(use_color))
|
||||
.border(Border::builder().build())
|
||||
.separator(Separator::builder().build());
|
||||
#[allow(clippy::print_stdout)]
|
||||
println!("{}", table.display()?);
|
||||
|
||||
if failures > 0 {
|
||||
|
|
@ -1172,7 +1168,6 @@ async fn test_models(
|
|||
.color_choice(color_choice(use_color))
|
||||
.border(Border::builder().build())
|
||||
.separator(Separator::builder().build());
|
||||
#[allow(clippy::print_stdout)]
|
||||
println!("{}", table.display()?);
|
||||
|
||||
if failures > 0 {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,15 @@ static INSTA_FILTERS: &[(&str, &str)] = &[
|
|||
(r"\([0-9a-f]{7} \d{4}-\d{2}-\d{2}\)", "([BUILD])"),
|
||||
(r"\b[0-9A-HJKMNP-TV-Z]{26}\b", "[ULID]"),
|
||||
(r"in \d+(\.\d+)?(ms|s)", "in [TIME]"),
|
||||
(
|
||||
r"\[STORAGE_DIR\]/runs/\d{8}-dry-run-\[ULID\]",
|
||||
"[DRY_RUN_DIR]",
|
||||
),
|
||||
(
|
||||
r"Duration:\s+\d+\s+(seconds?|minutes?|hours?)",
|
||||
"Duration: [DURATION]",
|
||||
),
|
||||
(r"Base: [^\n]+ \([0-9a-f]{7,40}\)", "Base: [BASE]"),
|
||||
(r"\\([\w\d])", "/$1"),
|
||||
];
|
||||
|
||||
|
|
@ -70,11 +79,12 @@ impl TestContext {
|
|||
|
||||
/// Returns the combined static + context-specific filters.
|
||||
pub fn filters(&self) -> Vec<(String, String)> {
|
||||
let mut filters: Vec<(String, String)> = INSTA_FILTERS
|
||||
.iter()
|
||||
.map(|(pat, rep)| ((*pat).to_string(), (*rep).to_string()))
|
||||
.collect();
|
||||
filters.extend(self.filters.clone());
|
||||
let mut filters = self.filters.clone();
|
||||
filters.extend(
|
||||
INSTA_FILTERS
|
||||
.iter()
|
||||
.map(|(pat, rep)| ((*pat).to_string(), (*rep).to_string())),
|
||||
);
|
||||
filters
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue