Problem
On large codebases, the clang-tidy hook can be very slow because files are
processed one at a time. This makes the pre-commit experience frustrating
and leads developers to skip or bypass the hook.
Proposed Solution
Add a --jobs / -j argument to run clang-tidy on multiple files in parallel:
- id: clang-tidy
args: [--checks=.clang-tidy, --version=21, --jobs=4]
This could be implemented using Python’s concurrent.futures.ThreadPoolExecutor
or multiprocessing.Pool internally.
Expected Benefit
A 4x–8x speedup on projects with dozens of files, making the hook
practical for commit-time use without the need for aggressive files.
Problem
On large codebases, the clang-tidy hook can be very slow because files are
processed one at a time. This makes the pre-commit experience frustrating
and leads developers to skip or bypass the hook.
Proposed Solution
Add a
--jobs / -jargument to run clang-tidy on multiple files in parallel:This could be implemented using Python’s concurrent.futures.ThreadPoolExecutor
or multiprocessing.Pool internally.
Expected Benefit
A 4x–8x speedup on projects with dozens of files, making the hook
practical for commit-time use without the need for aggressive files.