# HG changeset patch # User Matt Johnston # Date 1590297324 -28800 # Node ID 90fffce0ee99695de257ebedb9d1de9f127e4f07 # Parent 4b4cfc92c5b78cb933edbcc084d31aa833a879e6 Add linter for #ifdef diff -r 4b4cfc92c5b7 -r 90fffce0ee99 Makefile.in --- a/Makefile.in Thu May 21 23:00:22 2020 +0800 +++ b/Makefile.in Sun May 24 13:15:24 2020 +0800 @@ -236,7 +236,7 @@ $(STATIC_LTM): $(OPTION_HEADERS) $(MAKE) -C libtommath -.PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean +.PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean lint ltc-clean: $(MAKE) -C libtomcrypt clean @@ -262,6 +262,9 @@ tidy: -rm -f *~ *.gcov */*~ +lint: + cd $(srcdir); ./dropbear_lint.sh + ## Fuzzing targets # list of fuzz targets diff -r 4b4cfc92c5b7 -r 90fffce0ee99 dropbear_lint.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dropbear_lint.sh Sun May 24 13:15:24 2020 +0800 @@ -0,0 +1,8 @@ +#!/bin/sh + +EXITCODE=0 + +# #ifdef instead of #if +grep '#ifdef DROPBEAR' -I *.c *.h && EXITCODE=1 + +exit $EXITCODE diff -r 4b4cfc92c5b7 -r 90fffce0ee99 release.sh --- a/release.sh Thu May 21 23:00:22 2020 +0800 +++ b/release.sh Sun May 24 13:15:24 2020 +0800 @@ -30,6 +30,7 @@ hg archive "$RELDIR" || exit 2 (cd "$RELDIR" && autoconf && autoheader) || exit 2 +(cd "$RELDIR" && make lint) || exit 2 rm -r "$RELDIR/autom4te.cache" || exit 2