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 |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [usage](https://github.com/jdx/usage) | patch | `3.5.2` → `3.5.4` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>jdx/usage (usage)</summary> ### [`v3.5.4`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#354---2026-07-06) [Compare Source](jdx/usage@v3.5.3...v3.5.4) ##### 🐛 Bug Fixes - **(complete)** skip unreadable files in fish shebang completion scan by [@​GrantD-ADSK](https://github.com/GrantD-ADSK) in [#​707](jdx/usage#707) ##### 🔍 Other Changes - Enable Entire for Codex by [@​jdx](https://github.com/jdx) in [#​695](jdx/usage#695) - Update sponsor references for jdx.dev by [@​jdx](https://github.com/jdx) in [#​702](jdx/usage#702) - use release backends for cargo tools by [@​jdx](https://github.com/jdx) in [#​709](jdx/usage#709) ##### 📦️ Dependency Updates - update jdx/mise-action action to v4.2.0 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​698](jdx/usage#698) - update rust-lang/crates-io-auth-action action to v1.0.5 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​697](jdx/usage#697) - update rust crate itertools to 0.15 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​699](jdx/usage#699) - update actions/checkout action to v7 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​700](jdx/usage#700) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​701](jdx/usage#701) - update zizmorcore/zizmor-action action to v0.5.7 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​704](jdx/usage#704) - update dependency cargo-binstall to v1.20.1 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​703](jdx/usage#703) - update rust crate tera to v2 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​705](jdx/usage#705) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​708](jdx/usage#708) ##### New Contributors - [@​GrantD-ADSK](https://github.com/GrantD-ADSK) made their first contribution in [#​707](jdx/usage#707) ### [`v3.5.3`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#353---2026-06-23) [Compare Source](jdx/usage@v3.5.2...v3.5.3) ##### 🐛 Bug Fixes - **(docs)** show negated flags in cli help by [@​jdx](https://github.com/jdx) in [#​694](jdx/usage#694) - **(zsh)** preserve options for default completion by [@​jdx](https://github.com/jdx) in [#​693](jdx/usage#693) ##### 📦️ Dependency Updates - update jdx/pr-closer action to v1.1.0 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​689](jdx/usage#689) - lock file maintenance lockfile maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​691](jdx/usage#691) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTYuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
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.