diff --git a/crates/squabble-cli/src/fetch.rs b/crates/squabble-cli/src/fetch.rs index 184fa6b..0ec3c47 100644 --- a/crates/squabble-cli/src/fetch.rs +++ b/crates/squabble-cli/src/fetch.rs @@ -344,7 +344,8 @@ mod polarity_plumbing_tests { #[test] fn a_job_id_is_read_from_a_real_details_url() { // Shape taken from a live `gh pr view --json statusCheckRollup`. - let url = "https://github.com/hyperpolymath/standards/actions/runs/33817314194/job/100852208701"; + let url = + "https://github.com/hyperpolymath/standards/actions/runs/33817314194/job/100852208701"; assert_eq!(job_id_from_details_url(url), Some(100852208701)); } @@ -354,7 +355,8 @@ mod polarity_plumbing_tests { // of course. Cutting the id on `/` alone leaves the suffix attached, // `parse::` fails, and the green is skipped without a word — the // exact silent undercount this module exists to prevent. - let base = "https://github.com/hyperpolymath/standards/actions/runs/33817314194/job/100852208701"; + let base = + "https://github.com/hyperpolymath/standards/actions/runs/33817314194/job/100852208701"; for suffix in ["?check_suite_focus=true", "#step:4:1", "?a=1#step:2:9"] { let url = format!("{base}{suffix}"); assert_eq!( @@ -374,19 +376,14 @@ mod polarity_plumbing_tests { None ); assert_eq!( - job_id_from_details_url( - "https://github.com/o/r/actions/runs/1" - ), + job_id_from_details_url("https://github.com/o/r/actions/runs/1"), None ); } #[test] fn an_external_job_url_is_not_treated_as_a_github_actions_job() { - assert_eq!( - job_id_from_details_url("https://ci.example/job/42"), - None - ); + assert_eq!(job_id_from_details_url("https://ci.example/job/42"), None); } #[test] diff --git a/crates/squabble-cli/src/fight.rs b/crates/squabble-cli/src/fight.rs index 046186d..0455ad2 100644 --- a/crates/squabble-cli/src/fight.rs +++ b/crates/squabble-cli/src/fight.rs @@ -15,6 +15,7 @@ use squabble_core::moves::Move; use squabble_core::outcome::Escalation; use squabble_core::polarity::Evidence; use squabble_core::outcome::Outcome; +use squabble_core::polarity::{Applicability, Evidence, RepoDeclaration}; use squabble_fight::context::RepoContext; use std::path::PathBuf; use std::process::ExitCode; diff --git a/crates/squabble-core/src/polarity.rs b/crates/squabble-core/src/polarity.rs index 0eef3f0..eead5fa 100644 --- a/crates/squabble-core/src/polarity.rs +++ b/crates/squabble-core/src/polarity.rs @@ -492,7 +492,10 @@ pub fn classify( let cause = if signature.matches(steps) { Some(VacuityCause::StubbedAfterSkippedScan) - } else if steps.iter().all(|s| s.conclusion == StepConclusion::Skipped) { + } else if steps + .iter() + .all(|s| s.conclusion == StepConclusion::Skipped) + { Some(VacuityCause::AllStepsSkipped) } else { None @@ -669,7 +672,10 @@ mod tests { // A skip is half the signature, so anything we do not model must never // be mistaken for one. assert_eq!(StepConclusion::parse(None), StepConclusion::Other); - assert_eq!(StepConclusion::parse(Some("neutral")), StepConclusion::Other); + assert_eq!( + StepConclusion::parse(Some("neutral")), + StepConclusion::Other + ); assert_eq!( StepConclusion::parse(Some("skipped")), StepConclusion::Skipped @@ -830,7 +836,9 @@ mod tests { Recommendation::MakeItGreatInPractice ); assert!( - unmeasured.describe().contains("target-tech-present=unmeasured"), + unmeasured + .describe() + .contains("target-tech-present=unmeasured"), "got `{}`", unmeasured.describe() ); @@ -878,13 +886,11 @@ mod tests { #[test] fn genuine_and_not_applicable_project_to_nothing() { assert!(PolarityVerdict::Genuine.to_move("c").is_none()); - assert!( - PolarityVerdict::NotApplicable { - declaration: "d".into() - } - .to_move("c") - .is_none() - ); + assert!(PolarityVerdict::NotApplicable { + declaration: "d".into() + } + .to_move("c") + .is_none()); } // ---- the Rust witness of the SPARK theorem ------------------------------