[dpdk-dev] [PATCH v2] devtools: add explicit warning messages for forbidden tokens

Thomas Monjalon thomas at monjalon.net
Fri Nov 2 10:39:24 CET 2018


02/11/2018 07:00, Arnon Warshavsky:
> --- a/devtools/checkpatches.sh
> +++ b/devtools/checkpatches.sh
> @@ -49,13 +49,16 @@ check_forbidden_additions() { # <patch>
>  	awk -v FOLDERS="lib drivers" \
>  		-v EXPRESSIONS="rte_panic\\\( rte_exit\\\(" \
>  		-v RET_ON_FAIL=1 \
> +		-v MESSAGE='Using rte_panic/rte_exit' \
>  		-f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \
>  		"$1"
>  	# svg figures must be included with wildcard extension
>  	# because of png conversion for pdf docs
> +	message="Using explicit .svg extension in figures instead of .*"
>  	awk -v FOLDERS='doc' \
>  		-v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
>  		-v RET_ON_FAIL=1 \
> +		-v MESSAGE="$message" \
>  		-f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \
>  		"$1"
>  }

Why using a variable for message in the second check?




More information about the dev mailing list