diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:23:11 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:23:11 +0800 |
commit | abb968c6cdc50023b248b328a403444e644619bc (patch) | |
tree | 677efd848554bd613de1f09f01d3146d1c911288 /tools/check-c-style.sh | |
parent | 52bc77159e915ea52e32b4d7873aa644f885a859 (diff) | |
download | gsoc2013-empathy-abb968c6cdc50023b248b328a403444e644619bc.tar gsoc2013-empathy-abb968c6cdc50023b248b328a403444e644619bc.tar.gz gsoc2013-empathy-abb968c6cdc50023b248b328a403444e644619bc.tar.bz2 gsoc2013-empathy-abb968c6cdc50023b248b328a403444e644619bc.tar.lz gsoc2013-empathy-abb968c6cdc50023b248b328a403444e644619bc.tar.xz gsoc2013-empathy-abb968c6cdc50023b248b328a403444e644619bc.tar.zst gsoc2013-empathy-abb968c6cdc50023b248b328a403444e644619bc.zip |
Update tools to latest version of tp-glib and include a gitignore
svn path=/trunk/; revision=1883
Diffstat (limited to 'tools/check-c-style.sh')
-rw-r--r-- | tools/check-c-style.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/check-c-style.sh b/tools/check-c-style.sh index 357fdb365..dd62fb7ba 100644 --- a/tools/check-c-style.sh +++ b/tools/check-c-style.sh @@ -24,6 +24,26 @@ then fail=1 fi +if grep -En '[(][[:alnum:]_]+ ?\*[)][(]?[[:alpha:]_]' "$@"; then + echo "^^^ Our coding style is to have a space between a cast and the " + echo " thing being cast" + fail=1 +fi + +# this only spots casts +if grep -En '[(][[:alnum:]_]+\*+[)]' "$@"; then + echo "^^^ Our coding style is to have a space before the * of pointer types" + echo " (regex 1)" + fail=1 +fi +# ... and this only spots variable declarations and function return types +if grep -En '^ *(static |const |)* *[[:alnum:]_]+\*+([[:alnum:]_]|;|$)' \ + "$@"; then + echo "^^^ Our coding style is to have a space before the * of pointer types" + echo " (regex 2)" + fail=1 +fi + if test -n "$CHECK_FOR_LONG_LINES" then if egrep -n '.{80,}' "$@" |