Witness: enum witness_interface_state
[metze/wireshark/wip.git] / tools / pre-commit
1 #!/bin/sh
2 # Copyright 2013, Alexis La Goutte (See AUTHORS file)
3 #
4 # $Id$
5 #
6 # For git user, copy pre-commit in .git/hook/ folder
7 #   to don't launch the script when commit use --no-verify argument
8 #
9 # From
10 # http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes
11 #
12 for FILE in `git diff-index --cached --name-only HEAD` ; do
13     #Exit immediately if a command exits with a non-zero status.
14     set -e
15
16     #Check if checkhf is good
17     ./tools/checkhf.pl $FILE
18
19     #Check if checkAPIs is good
20     ./tools/checkAPIs.pl $FILE
21
22     #Check if fix-encoding-args is good
23     ./tools/fix-encoding-args.pl $FILE
24
25     #Check if fix-encoding-args is good
26     ./tools/fix-encoding-args.pl $FILE
27     #Add whitetrailing spaces...
28     #perl -p -i -e 's/\ +$//' $(find . -name "*.[ch]" -print)
29
30 done
31 exit
32
33 #
34 #  Editor modelines
35 #
36 #  Local Variables:
37 #  c-basic-offset: 4
38 #  tab-width: 8
39 #  indent-tabs-mode: nil
40 #  End:
41 #
42 #  ex: set shiftwidth=4 tabstop=8 expandtab:
43 #  :indentSize=4:tabSize=8:noTabs=true:
44 #