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 <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13464
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
Ben Walker 2022-06-24 09:07:58 -07:00 committed by Tomasz Zawadzki
parent b3692ea671
commit 08477ef8d9

View File

@ -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