Describe formatting in quality badge

This commit is contained in:
2026-10-20 19:30:25 -06:00
parent a825299ebc
commit d35cedd056
4 changed files with 12 additions and 8 deletions
+2 -3
View File
@@ -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
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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</text>', svg)
+7 -2
View File
@@ -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: