githook-clang-format
githook-clang-format copied to clipboard
Provide option to only give a warning instead of modifying the file
This hook by default modifies files in place. Doing so will lead to commits with a mixture of formatting and code changes.
Instead, provide a warning saying that the files in the commit do not match the desired style. Optionally reject the commit.
Another option: git-clang-format is able to format only the changed lines, instead of the whole file.
(If I find the time and energy, I might eventually experiment with this a bit.)