Repository navigation
cmd/git-validation: kong instead of the flag package - #16
Merged
Merged
Conversation
The command line moves to kong, the house parser, with upstream's flag names: --range, --list-rules, --run, --no-github, --no-travis and --travis-pr-only (now also --no-travis-pr-only), and -v, -D, -q, -d as short flags with --verbose, --debug, --quiet, --dir beside them. kong takes long flags with two dashes only: `-run X`, which the flag package read, now fails as an unknown flag; `--run X` works with both, so a caller can switch first. Usage errors exit 1, as the flag package's did (kong's 80 folded in), --help exits 0. primordium's shutdown runs the command: a run with commits to fix prints its count and exits 1 silently, any other failure is logged with its step and exits 1. The README's usage block is kong's --help; its examples use --run and --list-rules. depguard allows kong and primordium's shutdown beside its logger; main.go's backlog entry is re-measured (the flag globals and their findings are gone). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: closer-claudio <claudio@farcloser.world>
Author
|
Reviewed at 72ca01e |
apostasie
approved these changes
Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Why: the house command line is kong with primordium; git-validation ran on Go's flag package. A layer on #15.
🛠️ What:
--range,--list-rules,--run,--no-github,--no-travis,--travis-pr-only(also--no-travis-pr-only,=false);-v,-D,-q,-das short flags beside--verbose,--debug,--quiet,--dir.--help0.--help; examples use--run.🧪 How:
a8d4555with double-dash flags over 3 repositories, 24 cases: identical;--help, unknown flag,--travis-pr-only=falseand-d /nonexistentchecked;just lint,just test,just securitygreen.📝 Notes: breaking: single-dash long flags (
-run X) are unknown flags now;--runworks with this and with upstream.