Skip to content

Add help text to all hook CLI arguments #264

Description

@shenxianpeng

Context

The argparse definitions in the hook wrappers are inconsistent: some arguments have a help= description and others don't. For example, --fix in clang_tidy.py has help text, but --version, --compile-commands, --no-compile-commands, -j/--jobs, and -v/--verbose do not. This makes -h output incomplete and the code a little harder to read for newcomers.

Task

Add a short, one-line help= string to every add_argument(...) call that lacks one, in both files.

Files

  • cpp_linter_hooks/clang_format.py--version
  • cpp_linter_hooks/clang_tidy.py--version, --compile-commands, --no-compile-commands, -j/--jobs, -v/--verbose

Suggested wording (feel free to refine):

  • --version: "Version of the clang tool to install/run (e.g. 21 or 21.1.0); defaults to the latest stable wheel on PyPI."
  • --compile-commands: "Directory containing compile_commands.json to pass to clang-tidy via -p."
  • --no-compile-commands: "Disable auto-detection of compile_commands.json."
  • -j/--jobs: "Number of clang-tidy processes to run in parallel (default: 1)."
  • -v/--verbose: "Enable verbose output."

Acceptance criteria

  • Every add_argument in both files has a help= string.
  • No behavior change; existing tests still pass (pytest).

Getting started

See CONTRIBUTING.md. This is a docs/readability-only change — no logic is affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions