summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2011-11-18 12:48:23 +0000
committerCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2011-11-18 14:27:27 +0000
commit1537e60fff43189bd3ecbffaae686e91f1944268 (patch)
treea1f276f4cf992d04eb016e9be8e3b83b120ff3c2 /tools
parenta1f6b3c5cf3454ab2dc93f07cdaeca4f336f3fea (diff)
Update check-c-style.sh from telepathy-glib
Diffstat (limited to 'tools')
-rw-r--r--tools/check-c-style.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/check-c-style.sh b/tools/check-c-style.sh
index dd62fb7..4330b14 100644
--- a/tools/check-c-style.sh
+++ b/tools/check-c-style.sh
@@ -44,6 +44,19 @@ if grep -En '^ *(static |const |)* *[[:alnum:]_]+\*+([[:alnum:]_]|;|$)' \
fail=1
fi
+if grep -n 'g_hash_table_destroy' "$@"; then
+ echo "^^^ Our coding style is to use g_hash_table_unref"
+ fail=1
+fi
+
+for p in "" "ptr_" "byte_"; do
+ if grep -En "g_${p}array_free \(([^ ,]+), TRUE\)" "$@"; then
+ echo "^^^ Our coding style is to use g_${p}array_unref in the case "
+ echo " the underlying C array is not used"
+ fail=1
+ fi
+done
+
if test -n "$CHECK_FOR_LONG_LINES"
then
if egrep -n '.{80,}' "$@"