]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Add git pre-commit hook script to uncrustify
authorHeiko Hund <heiko@ist.eigentlich.net>
Thu, 21 Apr 2022 16:43:30 +0000 (18:43 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 22 Apr 2022 07:25:55 +0000 (09:25 +0200)
commit237ba888684e9b035e3b05d661dd44011be0dcb2
treeed26b714cf385aba3e8e9cd9d5f659f8b0a6c225
parentabe49856d81f51136d543539202a0bf8fb946474
Add git pre-commit hook script to uncrustify

The script is self installing if you call it with "install" as the first
parameter. Once installed as the pre-commit hook it will check files to
be committed according to the rules in uncrustify.conf and abort the
commit if there's formatting issues. The script produces a patch in /tmp
which can be git apply'ed to fix all issues found.

The script was originally authored by David Martin [1] and slightly
modified to fit our needs. At the time it had a 2-clause BSD license.

[1] https://github.com/ddddavidmartin/Pre-commit-hooks

Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20220421164330.2483743-1-heiko@ist.eigentlich.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24141.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
CONTRIBUTING.rst
dev-tools/git-pre-commit-uncrustify.sh [new file with mode: 0755]