Skip to content

Commit 7feda5b

Browse files
committed
feat: update per code review
1 parent 997feb4 commit 7feda5b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

cpp_linter_hooks/util.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,19 @@ def _resolve_install(tool: str, version: Optional[str]) -> Optional[Path]:
8989
return _install_tool(tool, user_version)
9090

9191

92-
def main():
93-
parser = ArgumentParser("Install specified clang tool wheel")
94-
parser.add_argument("--tool", default="clang-format")
95-
parser.add_argument("--version", default=None)
92+
def main() -> int:
93+
parser = ArgumentParser(description="Install specified clang tool wheel")
94+
parser.add_argument(
95+
"--tool",
96+
default="clang-format",
97+
choices=["clang-format", "clang-tidy"],
98+
help="Tool to install (clang-format or clang-tidy)",
99+
)
100+
parser.add_argument(
101+
"--version",
102+
default=None,
103+
help="Version to install (e.g., 21 or 21.1.2). Defaults to latest compatible version.",
104+
)
96105
args = parser.parse_args()
97106
path = _resolve_install(args.tool, args.version)
98107
if path:

0 commit comments

Comments
 (0)