Skip to content

fix: subgroup help indentation #1355 - #1371

Merged
phlptp merged 2 commits into
CLIUtils:mainfrom
oscarpeer-design:fix-subgroup-help-indentation
Jun 18, 2026
Merged

phlptp merged 2 commits into
CLIUtils:mainfrom
oscarpeer-design:fix-subgroup-help-indentation

Conversation

@oscarpeer-design

Copy link
Copy Markdown
Contributor

Fixes #1355

Summary
Fixes a subgroup indentation bug caused by subgroup help text being indented multiple times during formatting. This resulted in inconsistent alignment of subgroup headers and descriptions from previous CLI11 releases.

Changes

  • Removed the redundant indentation step applied to expanded subgroup output.
  • Preserved the existing indentation logic within make_expanded().
  • Added a regression test (SubgroupHelpIndentation) covering nested option group formatting.

Result

Nested option groups now render with consistent indentation and the regression test verifies option groups are being formatted correctly.

@codecov

codecov Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e4ee3af) to head (8379f67).
⚠️ Report is 215 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #1371     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files           17        19      +2     
  Lines         4546      5183    +637     
  Branches         0      1105   +1105     
===========================================
+ Hits          4546      5183    +637     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@phlptp

phlptp commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

thanks

@phlptp
phlptp merged commit b595bb4 into CLIUtils:main Jun 18, 2026
74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subgroup help message: broken indentation

2 participants