diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-12 16:55:14 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-12 16:55:14 +0000 |
commit | 5185a3c74ff90338ad30d39bef87259100bf13ad (patch) | |
tree | ff502fadb3539a2a41abe48773909be631ee7c80 | |
parent | ffb2e72a0ceeafd21596eaa38e13f5ef7f98e838 (diff) |
Sync check-c-style.sh from telepathy-glib: use [:upper:] and friends instead of A-Z
-rw-r--r-- | check-c-style.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/check-c-style.sh b/check-c-style.sh index c8ef823d3..793d34b82 100644 --- a/check-c-style.sh +++ b/check-c-style.sh @@ -3,7 +3,7 @@ fail=0 /bin/sh "${top_srcdir}"/check-whitespace.sh "$@" || fail=$? -if grep -n '^ *GError *\*[a-zA-Z_][a-zA-Z0-9_]* *;' "$@" +if grep -n '^ *GError *\*[[:alpha:]_][[:alnum:]_]* *;' "$@" then echo "^^^ The above files contain uninitialized GError*s - they should be" echo " initialized to NULL" @@ -15,10 +15,10 @@ fi # The second and third ignore block comments (gtkdoc uses foo() as markup). # The fourth ignores cpp so you can # #define foo(bar) (_real_foo (__FUNC__, bar)) (cpp insists on foo() style). -if grep -n '^[^"]*[a-z](' "$@" \ - | grep -v '^[-a-zA-Z0-9_./]*:[0-9]*: *\*' \ - | grep -v '^[-a-zA-Z0-9_./]*:[0-9]*: */\*' \ - | grep -v '^[-a-zA-Z0-9_./]*:[0-9]*: *#' +if grep -n '^[^"]*[[:lower:]](' "$@" \ + | grep -v '^[-[:alnum:]_./]*:[[:digit:]]*: *\*' \ + | grep -v '^[-[:alnum:]_./]*:[[:digit:]]*: */\*' \ + | grep -v '^[-[:alnum:]_./]*:[[:digit:]]*: *#' then echo "^^^ Our coding style is to use function calls like foo (), not foo()" fail=1 |