1 Commits

Author SHA1 Message Date
David Sommerseth
3bcb671d33 scripts: Add pre-commit hook for clang-format style check
When enabling this pre-commit hook, clang-format will be run before the
commit can be completed.  If the changes about to be committed does not
adhere to the defined code style, the current commit will not be completed.

To install this pre-commit hook, run:

    $ ./scripts/git-pre-commit-clangformat.sh install

This script is a slightly modified version of what is used in the
OpenVPN 2.x project, slightly modified to use clang-format instead of
uncrustify and to extend the file change filter check to include C++ source
and header files.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2023-02-01 19:16:51 +01:00