From 08477ef8d97f1932d54187054ab6090255e01365 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Fri, 24 Jun 2022 09:07:58 -0700 Subject: [PATCH] check_format: Split astyle call for C and C++ These are going to need different options in an upcoming patch. Change-Id: I5d43f21887abefbae207b5cff23fafcfac4a33d7 Signed-off-by: Ben Walker Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13464 Reviewed-by: Jim Harris Reviewed-by: Dong Yi Reviewed-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI --- scripts/check_format.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index ec47e9b9f..c2f68fa20 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -130,7 +130,11 @@ function check_c_style() { # as-is to enable ongoing work to synch with a generic upstream DPDK vhost library, # rather than making diffs more complicated by a lot of changes to follow SPDK # coding standards. - git ls-files '*.[ch]' '*.cpp' '*.cc' '*.cxx' '*.hh' '*.hpp' \ + git ls-files '*.[ch]' \ + | grep -v rte_vhost | grep -v cpp_headers \ + | xargs -P$(nproc) -n10 astyle \ + --options=.astylerc >> astyle.log + git ls-files '*.cpp' '*.cc' '*.cxx' '*.hh' '*.hpp' \ | grep -v rte_vhost | grep -v cpp_headers \ | xargs -P$(nproc) -n10 astyle --options=.astylerc >> astyle.log if grep -q "^Formatted" astyle.log; then