Skip to content

docs: add missing CLI help text - #278

Merged
shenxianpeng merged 1 commit into
cpp-linter:mainfrom
pttydou:feature/264-cli-help
Aug 23, 2026
Merged

docs: add missing CLI help text#278
shenxianpeng merged 1 commit into
cpp-linter:mainfrom
pttydou:feature/264-cli-help

Conversation

@pttydou

@pttydou pttydou commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add descriptions for every hook-specific CLI argument
  • add regression tests that require each parser action to render help text

Related Issues

Closes #264

Tests

  • uv run pytest -q (119 passed)
  • uv run coverage run --source=tests,cpp_linter_hooks -m pytest -q && uv run coverage report (119 passed; 98% total coverage)
  • uv run pre-commit run --all-files

Summary by CodeRabbit

  • Documentation

    • Improved command-line help for clang-format and clang-tidy options.
    • Clarified the clang-format version option, including its default behavior.
    • Added descriptions for compilation database, parallel jobs, verbosity, and related options.
  • Tests

    • Added coverage to verify that all command-line options include and display help text.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 341540eb-6c5f-4a73-a1d1-114101d90bd5

📥 Commits

Reviewing files that changed from the base of the PR and between 1a33baa and 02b9721.

📒 Files selected for processing (4)
  • cpp_linter_hooks/clang_format.py
  • cpp_linter_hooks/clang_tidy.py
  • tests/test_clang_format.py
  • tests/test_clang_tidy.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The pull request adds help text to all previously undocumented clang-format and clang-tidy arguments. Tests verify that every parser action has help text and that descriptions appear in formatted CLI help output.

Changes

CLI help text

Layer / File(s) Summary
Add argument descriptions
cpp_linter_hooks/clang_format.py, cpp_linter_hooks/clang_tidy.py
The parsers now define help text for all previously undocumented arguments. Argument behavior remains unchanged.
Validate rendered help
tests/test_clang_format.py, tests/test_clang_tidy.py
Tests verify that every parser action has non-empty help text and that each description appears in formatted help output.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 02b97

This change adds missing CLI help descriptions and regression coverage without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the addition of missing CLI help text, which is the main change.
Linked Issues check ✅ Passed The changes add help text to all specified arguments and add regression tests without changing behavior, satisfying issue #264.
Out of Scope Changes check ✅ Passed All changes support the linked issue by documenting CLI arguments and testing help output; no unrelated changes are present.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.53%. Comparing base (1a33baa) to head (02b9721).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #278   +/-   ##
=======================================
  Coverage   97.53%   97.53%           
=======================================
  Files           3        3           
  Lines         243      243           
=======================================
  Hits          237      237           
  Misses          6        6           

☔ 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.

@codspeed-hq

codspeed-hq Bot commented Aug 23, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 92 untouched benchmarks
⏩ 54 skipped benchmarks1


Comparing pttydou:feature/264-cli-help (02b9721) with main (94ee3ba)2

Open in CodSpeed

Footnotes

  1. 54 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (1a33baa) during the generation of this report, so 94ee3ba was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@shenxianpeng shenxianpeng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR.

@shenxianpeng
shenxianpeng merged commit 05fa3a4 into cpp-linter:main Aug 23, 2026
29 of 30 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.

Add help text to all hook CLI arguments

2 participants