From 5d0fa2f85c155039fcca97a0872c138400ee134c Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Wed, 23 Mar 2022 21:29:54 -0400 Subject: build: exclude dlmalloc.[ch] from checkstyle verification - dlmalloc.[ch] is an imported open source library which somehow manages to choke clang-format-diff to the point of consuming ~1 minute to run against a single character diff. Type: make Signed-off-by: Dave Wallace Change-Id: I16c6d6da664da8634aa682dce9d2120072626730 --- extras/scripts/checkstyle.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'extras/scripts') diff --git a/extras/scripts/checkstyle.sh b/extras/scripts/checkstyle.sh index 053342f8787..2b884f5f08b 100755 --- a/extras/scripts/checkstyle.sh +++ b/extras/scripts/checkstyle.sh @@ -22,6 +22,10 @@ CLANG_FORMAT_DIFF="/usr/share/clang/clang-format-diff.py" # CLANG_FORMAT_VER default value is upgraded CLANG_FORMAT_VER=${CLANG_FORMAT_VER:-11} GIT_DIFF_ARGS="-U0 --no-color --relative HEAD~1" +GIT_DIFF_EXCLUDE_LIST=( + ':!*.patch' + ':(exclude)*src/vppinfra/dlmalloc.*' +) CLANG_FORMAT_DIFF_ARGS="-style file -p1" SUFFIX="-${CLANG_FORMAT_VER}" @@ -76,7 +80,7 @@ then fi in=$(mktemp) -git diff ${GIT_DIFF_ARGS} ':!*.patch' > ${in} +git diff ${GIT_DIFF_ARGS} ${GIT_DIFF_EXCLUDE_LIST[@]} > ${in} line_count=$(sed -n '/^+.*\*INDENT-O[NF][F]\{0,1\}\*/p' ${in} | wc -l) if [ ${line_count} -gt 0 ] ; then -- cgit 1.2.3-korg