Skip to content

cmd/git-validation: kong instead of the flag package - #16

Merged
apostasie merged 1 commit into
mainfrom
claudio/20261017-kong
Oct 17, 2026
Merged

apostasie merged 1 commit into
mainfrom
claudio/20261017-kong

Conversation

@closer-claudio

Copy link
Copy Markdown

🎯 Why: the house command line is kong with primordium; git-validation ran on Go's flag package. A layer on #15.

🛠️ What:

  • kong with upstream's flag names: --range, --list-rules, --run, --no-github, --no-travis, --travis-pr-only (also --no-travis-pr-only, =false); -v, -D, -q, -d as short flags beside --verbose, --debug, --quiet, --dir.
  • primordium's shutdown sets the exit status: commits to fix print their count and exit 1, other failures are logged with their step and exit 1, usage errors exit 1, --help 0.
  • README: the usage block is kong's --help; examples use --run.

🧪 How:

  1. cmd/git-validation: kong instead of the flag package. V: stdout against upstream a8d4555 with double-dash flags over 3 repositories, 24 cases: identical; --help, unknown flag, --travis-pr-only=false and -d /nonexistent checked; just lint, just test, just security green.

📝 Notes: breaking: single-dash long flags (-run X) are unknown flags now; --run works with this and with upstream.

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>
@closer-claudio closer-claudio added the breaking Breaks a consumer label Oct 17, 2026
@closer-claudio

Copy link
Copy Markdown
Author

Reviewed at 72ca01e

Base automatically changed from claudio/20261017-depguard to main October 17, 2026 18:43
@apostasie
apostasie merged commit febb58f into main Oct 17, 2026
9 checks passed
@apostasie
apostasie deleted the claudio/20261017-kong branch October 17, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaks a consumer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants