githook-clang-format icon indicating copy to clipboard operation
githook-clang-format copied to clipboard

Provide option to only give a warning instead of modifying the file

Open andrewseidl opened this issue 10 years ago • 1 comments

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.

andrewseidl avatar Dec 02 '14 22:12 andrewseidl

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.)

hugovdm avatar May 28 '20 09:05 hugovdm