diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-04-24 13:47:09 +0100 |
---|---|---|
committer | Simon McVittie <smcv@carbon.pseudorandom.co.uk> | 2007-04-24 18:02:25 +0100 |
commit | cdf20eebae59e0ceb2cf8fc2660609e6c38ccebf (patch) | |
tree | e7bebef73fd9965c774823a927974364d2903e84 /tools/check-c-style.sh | |
parent | b5552a3ea76b3e229f40a06d32a5860b0e9e2217 (diff) | |
download | dbus-python-cdf20eebae59e0ceb2cf8fc2660609e6c38ccebf.tar.gz |
Add optional checks for coding style (mainly whitespace at the moment).
These are on by default for git builds, off by default for releases.
Diffstat (limited to 'tools/check-c-style.sh')
-rw-r--r-- | tools/check-c-style.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/check-c-style.sh b/tools/check-c-style.sh new file mode 100644 index 0000000..177355e --- /dev/null +++ b/tools/check-c-style.sh @@ -0,0 +1,17 @@ +#!/bin/sh +fail=0 + +/bin/sh "${top_srcdir}"/tools/check-whitespace.sh "$@" || fail=$? + +# at the moment we're not actually checking much C style here... to be added + +if test -n "$CHECK_FOR_LONG_LINES" +then + if egrep -n '.{80,}' "$@" + then + echo "^^^ The above files contain long lines" + fail=1 + fi +fi + +exit $fail |