fix(docs): show negated flags in cli help#694
Conversation
|
Warning Review limit reached
More reviews will be available in 41 minutes and 20 seconds. Learn how PR review limits work. To continue reviewing without waiting, enable usage-based billing in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds proper rendering of negated boolean flags in CLI help output, displaying them as
Confidence Score: 5/5Safe to merge — changes are additive and well-tested with matching snapshots. The change is narrow: one new derived field, two template substitutions, and matching snapshot tests. The refactor of the two-pass flag-collection correctly moves column-width measurement to use the longer No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(docs): show negated flags in cli hel..." | Re-trigger Greptile |
Summary
--flag / --no-flagValidation
cargo fmt --allcargo test -p usage-lib --features docsNote
Low Risk
Docs-only CLI help rendering and tests; no parsing or runtime flag behavior changes.
Overview
CLI help for boolean flags with a negate alias now shows both forms as
--flag / --no-flaginstead of only the positive option.A new
display_usagefield on docSpecFlagbuilds that string fromusageandnegate. Short and long Tera templates renderdisplay_usageinstead ofusage, and flag column width for aligned long help is computed fromdisplay_usageso wider negated pairs still line up with descriptions.Snapshot tests cover short and long help for a
--compress/--no-compressexample.Reviewed by Cursor Bugbot for commit 13b02a5. Bugbot is set up for automated code reviews on this repo. Configure here.