feat(cli): add badge subcommand for SVG score badges#32
Conversation
Generate shields.io-style flat badges showing Arbiter score and grade. Supports --output for file, --markdown for embed snippet. Color-coded by grade: A=green through F=red. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eef27cf2a5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| loc = count_loc(repo_path) | ||
| score = score_findings(findings, loc) | ||
|
|
||
| svg = generate_badge(score.overall if score.is_scorable else 0, score.grade) |
There was a problem hiding this comment.
Avoid reporting synthetic zero for unscorable repos
When a repository has no scorable Python LOC (score.is_scorable == False), this code forces the badge score to 0, which renders as 0 (N/A). That mixes two different states ("not scorable" vs. "scored zero") and can mislead consumers of the badge in README/automation for non-Python or fully excluded repos. The badge path should preserve an explicit non-numeric value instead of fabricating a numeric zero.
Useful? React with 👍 / 👎.
Summary
badge.pymodule with shields.io-style SVG generationbadgeCLI subcommand: score a repo and output an SVG badge--output,--markdown,--exclude,--noise-thresholdUsage
Test plan
🤖 Generated with Claude Code