Repository navigation
fix(gen): stop backticks in descriptions from becoming flag types in --help - #17
Merged
Merged
Conversation
…--help pflag reads the first backticked word in a usage string as the flag's value name, so descriptions like 'Requires `arrivalId`' printed `--max-price arrivalId` instead of `--max-price int`. buildHelp now swaps backticks for plain quotes. cmd/ is regenerated against the same spec hash; only flag usage strings change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VkPtq7Nyd8XbgFqYQWcYfm
rmilyushkevich
commented
Oct 20, 2026
rmilyushkevich
left a comment
Contributor
Author
There was a problem hiding this comment.
Maintainer review of 413f231. I'm leaving a COMMENT review because GitHub doesn't let this account approve its own PR.
internal/gen/main.go,buildHelp: this is the only hand-written change. BothbuildJSONHelpand every scalar/slice/kv flag go through it, so every flag usage string is covered. CommandLongtext keeps its backticks, which is harmless because pflag only unquotes flag usage.- Generated output: every changed line in
cmd/is acmd.Flags()…usage string.spec-hash.txtis unchanged, and CIverify-generatedis green. - Harness: static, smoke and command-surface checks are clean; there's no surface diff.
No findings. Merging once CI is green.
Generated by Claude Code
Merged
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.
pflag's
UnquoteUsagereads the first backticked word in a flag's usage string as its value name. Catalog descriptions use Markdown code spans, so--helpprinted things like--adults arrivalIdand--max-price arrivalIdinstead ofint.buildHelp(internal/gen/main.go) now swaps backticks for single quotes.cmd/gen_*.gois regenerated against the same spec hash (f9e447f42c33). The diff touches onlycmd.Flags()…usage strings and the timestamp inGENERATION_REPORT.md.Note: the generator skips writing when the spec hash is unchanged, so I regenerated by pointing
-hash-fileat an empty temp file.spec-hash.txtdoesn't change, soverify-generatedstill sees the tree as current.Before / after (
google-flights-deals --help):Harness on 413f231: vet/build/test pass;
--helpsmoke passes on 67 commands,versionandcompletion. Command-surface diff vs main: none (flag names, types, defaults and required are unchanged). No live calls, because request building isn't touched.Generated by Claude Code