Apply clang-format to git hook for automatically checking code style before commit. Unformatted changes are unable to commit to the local repository once it's installed.
$ git commit
File "access/pdp/pdp.c" is not compliant with the coding style
85c85,89
< } else if (memcmp("not", operation, size) == 0) { ret = NOT; } else if (memcmp("leq", operation, size) == 0) { ret = LEQ; } else if (memcmp("geq", operation, size) ==
0) {
---
> } else if (memcmp("not", operation, size) == 0) {
> ret = NOT;
> } else if (memcmp("leq", operation, size) == 0) {
> ret = LEQ;
> } else if (memcmp("geq", operation, size) == 0) {
Run ./git_hooks/formatter to fix it
$
Apply clang-format to git hook for automatically checking code style before commit. Unformatted changes are unable to commit to the local repository once it's installed.