Skip to content

ksh1102/clang-tidy-diff-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clang-tidy-diff-hook

A pre-commit hook for clang-tidy.

It does git diff [origin/main | PRE_COMMIT_FROM_REF] -U0 --no-prefix | clang-tidy-diff -quiet -fix -path build.

Usage

-   repo: https://github.com/ksh1102/clang-tidy-diff-hook
    rev: v0.1.0
    hooks:
    -   id: clang-tidy-diff
        args: ['-clang-tidy-binary', 'clang-tidy-14', '-path', 'build']
    # Do whenever to add headers to build/compile_commands.json
    -   id: add-headers
        # path to directory containing compile_commands
        args: ['-path', 'build']
        stages: [manual]

About

Pre-commit hook which invokes clang-tidy

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages