Open flybrotherlixiang opened 4 years ago
Currently, this is not possible, and I don't foresee it being possible because clang-format uses the entire file as context, each line isn't formatted on its own
--lines
option of ClangFormat can do this, you need to get the diff lines using git diff
in advance .
$DIR/bin/clang-format-3.8-custom -style=file -lines=$line
Is it possible for the pre-commit hook to work just upon the committed code instead of the entire file?