[dpdk-dev] [PATCH] devtools: check wrong svg include in patches
Arnon Warshavsky
arnon at qwilt.com
Wed Oct 31 16:46:56 CET 2018
Hi Thomas
Glad the function gets to be reused :)
Now that it has more than one consumer apparently the function
check_forbidden_additions() cannot be fed by stdin.
I got it working with 3 changes:
1. call the awk script with $tmpinput as a parameter instead of stdin. This
aligns with Neils changes from previous version
2. Escaped the spaces from the regex , as the awk script uses spaces to
tell multiple forbidden expressions apart (which now I see sucks ...),
and added an extra backslash
3. call the function with no parameters (not needed anymore)
awk -v FOLDERS="lib drivers" \
-v EXPRESSIONS="rte_panic\\\( rte_exit\\\(" \
-v RET_ON_FAIL=1 \
- -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk -
+ -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk
*$tmpinput*
+
+ awk -v FOLDERS='doc' \
+ -v EXPRESSIONS='*::[[:space:]]*[^[:space:]]*\\\.svg*' \
+ -v RET_ON_FAIL=1 \
+ -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk
*$tmpinput*
! $verbose || printf '\nChecking forbidden tokens additions:\n'
- report=$(check_forbidden_additions *<"$tmpinput"*)
+ report=$(check_forbidden_additions)
thanks
/Arnon
More information about the dev
mailing list