mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
add a check for obsolete headers
This commit is contained in:
parent
af07a00082
commit
d017d73399
@ -56,9 +56,19 @@ rm -f src.typos
|
|||||||
#
|
#
|
||||||
find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \
|
find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \
|
||||||
grep -E -e '\<(bcmp|bcopy|bzero|getwd|index|mktemp|rindex|utimes)\>[[:space:]]*\(' \
|
grep -E -e '\<(bcmp|bcopy|bzero|getwd|index|mktemp|rindex|utimes)\>[[:space:]]*\(' \
|
||||||
| sed -e "s:^$srcdir/\.\./::g" > src.obsolete
|
| sed -e "s:^$srcdir/\.\./::g" > src.obsolete.funcs
|
||||||
testing "Obsolete function usage" "cat src.obsolete" "" "" ""
|
testing "Obsolete function usage" "cat src.obsolete.funcs" "" "" ""
|
||||||
rm -f src.obsolete
|
rm -f src.obsolete.funcs
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# don't allow obsolete headers
|
||||||
|
#
|
||||||
|
find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \
|
||||||
|
grep -E -e '\<(malloc|memory)\.h\>' \
|
||||||
|
| sed -e "s:^$srcdir/\.\./::g" > src.obsolete.headers
|
||||||
|
testing "Obsolete function usage" "cat src.obsolete.headers" "" "" ""
|
||||||
|
rm -f src.obsolete.headers
|
||||||
|
|
||||||
|
|
||||||
exit $FAILCOUNT
|
exit $FAILCOUNT
|
||||||
|
Loading…
Reference in New Issue
Block a user