From e450a34aa9cd813b4518552aa996a012467c7707 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Thu, 12 Apr 2018 11:01:05 -0700 Subject: [PATCH] check_format: Ignore rte_vhost code in forbidden function check Also print out line numbers. Change-Id: I1beb363795d7c8b0d04cb501a2e7169b313134a0 Signed-off-by: Ben Walker Reviewed-on: https://review.gerrithub.io/407495 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp --- scripts/check_format.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index edea664a9..2e841ef46 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -77,8 +77,7 @@ rm -f whitespace.log echo -n "Checking for use of forbidden library functions..." -git grep -w '\(strcpy\|sprintf\|vsprintf\)' -- app examples lib test > badfunc.log || true - +git grep --line-number -w '\(strcpy\|sprintf\|vsprintf\)' -- './*.c' ':!lib/vhost/rte_vhost*/**' > badfunc.log || true if [ -s badfunc.log ]; then echo " Forbidden library functions detected" cat badfunc.log