diff --git a/README.md b/README.md index fec0b660..f00f56ef 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,8 @@ ![dependencies](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/dependencies.svg) ![license](https://gitea.bluefla.re/blueflare/alkane-toolkit/raw/branch/ci-badges/badges/license.svg) -The code quality grade reports first-party Clippy checks from the last -successful main build. Test coverage has a separate badge. Formatting is not -part of the grade yet. +The code quality grade reports GUI Clippy and first-party Rust formatting checks +from the last successful main build. Test coverage has a separate badge. Desktop miner discovery and monitoring. The Rust GUI uses wxWidgets through a patched [wx-rs bridge](thirdparty/wx-rs). In-app image flashing is disabled diff --git a/ci/gen-badges.py b/ci/gen-badges.py index 6c3e0d01..ba9f005c 100644 --- a/ci/gen-badges.py +++ b/ci/gen-badges.py @@ -193,7 +193,7 @@ def main() -> int: write("quality", "code quality", grade, {"A": "brightgreen", "B": "yellowgreen", "C": "yellow", "D": "orange", "F": "red", "pending": "lightgrey"}[grade], - f"code quality: {grade} (first-party Clippy only)") + f"code quality: {grade} (GUI Clippy and first-party rustfmt)") if args.tests is not None: write("tests", "tests", f"{args.tests} passing", "brightgreen") if args.coverage is not None: diff --git a/ci/test-bench-badge.py b/ci/test-bench-badge.py index fbd235b5..1cf6ff3d 100644 --- a/ci/test-bench-badge.py +++ b/ci/test-bench-badge.py @@ -56,9 +56,9 @@ class BenchBadgeTests(unittest.TestCase): self.assertEqual(gen_badges.quality_grade(None), "pending") svg = gen_badges.badge_svg( "code quality", "A", "brightgreen", - "code quality: A (first-party Clippy only)", + "code quality: A (GUI Clippy and first-party rustfmt)", ) - self.assertIn('aria-label="code quality: A (first-party Clippy only)"', svg) + self.assertIn('aria-label="code quality: A (GUI Clippy and first-party rustfmt)"', svg) self.assertIn('>A', svg) diff --git a/ci/test-pr-surface.py b/ci/test-pr-surface.py index 047ad11d..73226877 100644 --- a/ci/test-pr-surface.py +++ b/ci/test-pr-surface.py @@ -31,7 +31,8 @@ def check_workflow_contract() -> None: """Keep the short workflow check from silently dropping release gates.""" required = { "release.yml": ("main", "release", ( - "Check runner image pins", "Clippy (our crate, warnings are errors)", + "Check runner image pins", "Check first-party Rust formatting", + "Clippy (our crate, warnings are errors)", "Build release", "Unit tests", "Microbenchmarks", "Headless UI self-test", "Coverage", "Microbenchmark coverage", "Generate measured badges", "Publish measured badges", @@ -44,7 +45,8 @@ def check_workflow_contract() -> None: )), "verify.yml": ("main", "verify", ( "Check runner image pins", "Detect changed surface", - "Check CI change surface", "Check workflow-only change", + "Check CI change surface", "Check first-party Rust formatting", + "Check workflow-only change", "Clippy (our crate, warnings are errors)", "Build", "Unit tests", "Microbenchmarks", "Headless UI self-test", "Clean generated Toolkit build", )), @@ -73,6 +75,9 @@ def check_workflow_contract() -> None: assert condition == "steps.surface.outputs.surface == 'full'", path elif filename == "verify.yml" and gate == "Check CI change surface": assert condition == "steps.surface.outputs.surface != 'documentation'", path + elif filename == "verify.yml" and gate == "Check first-party Rust formatting": + assert condition == ("steps.surface.outputs.surface == 'headless' || " + "steps.surface.outputs.surface == 'full'"), path elif filename == "verify.yml" and gate == "Check workflow-only change": assert condition == "steps.surface.outputs.surface == 'workflow'", path else: