From c825a74dd1181b12ac1531e2bd6b125de268a296 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 17 Jan 2011 20:04:53 -0500 Subject: tests: check for trailing blank newlines Signed-off-by: Mike Frysinger --- src/test/runtests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/test/runtests.sh b/src/test/runtests.sh index 8a8c467..f913820 100755 --- a/src/test/runtests.sh +++ b/src/test/runtests.sh @@ -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\>' {} +) -- cgit v1.2.3