#!/bin/sh
# $Id: cppcheck-lint,v 1.2 2021/03/27 22:37:14 tom Exp $
OPT=
ARG=
for n in "$@"
do
	case .$n in
	.-[lLW]*)
		;;
	*.[ch]|*.cc|*.hh|*.cpp)
		ARG="$ARG $n"
		;;
	*.[ly])
		;;
	.-[DUI]*)
		# just in case I need to handle blanks in -D options
		n=`echo "$n" | sed -e 's/ /_/g'`
		OPT="$OPT $n"
		;;
	esac
done
[ -n "$ARG" ] && exec cppcheck --enable=all --suppress=missingIncludeSystem $OPT $ARG
