diff dropbear_lint.sh @ 1679:90fffce0ee99

Add linter for #ifdef
author Matt Johnston <matt@ucc.asn.au>
date Sun, 24 May 2020 13:15:24 +0800
parents
children
line wrap: on
line diff
--- /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