tests: check for trailing blank newlines

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2011-01-17 20:04:53 -05:00
parent 69abe1b2e8
commit c825a74dd1

View File

@ -74,6 +74,14 @@ out=$(cd ${top_srcdir}; find */ \
[ -z "${out}" ]
eend $? "Trailing whitespace needs to be deleted:"$'\n'"${out}"
ebegin "Checking trailing newlines in code"
out=$(cd ${top_srcdir};
for f in `find */ -name '*.[ch]'` ; do
sed -n -e :a -e '/^\n*$/{$q1;N;ba' -e '}' $f || echo $f
done)
[ -z "${out}" ]
eend $? "Trailing newlines need to be deleted:"$'\n'"${out}"
ebegin "Checking for obsolete functions"
out=$(cd ${top_srcdir}; find src -name '*.[ch]' \
-exec grep -n -E '\<(malloc|memory|sys/(errno|fcntl|signal|stropts|termios|unistd))\.h\>' {} +)