diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-01-17 20:04:53 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-01-17 20:04:53 -0500 |
commit | c825a74dd1181b12ac1531e2bd6b125de268a296 (patch) | |
tree | 8bb18b254c1952f813d91bd83b859fdadd33c8b1 /src/test | |
parent | 69abe1b2e8db4947e4530b81a6b24aefe099b9f5 (diff) |
tests: check for trailing blank newlines
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/runtests.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/runtests.sh b/src/test/runtests.sh index 8a8c467e..f913820f 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\>' {} +) |