scripts/check_format: remove extra output from shfmt check.

All of the other checks simply print OK if the test passes
this check prints out a lot of text (especially when run at the
tip of long patch series) that can make it difficult to tell if
anything is actually wrong.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie681d200aa13f208e4afa1ab419cbad63ef6606c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2403
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Seth Howell 2020-05-12 16:37:45 -07:00 committed by Tomasz Zawadzki
parent cac5022e61
commit 4bd48a3d97

View File

@ -261,21 +261,12 @@ if [ -n "$shfmt" ]; then
) )
if ((${#sh_files[@]})); then if ((${#sh_files[@]})); then
printf 'Checking .sh formatting style...\n\n' printf 'Checking .sh formatting style...'
printf ' Found %u updated|new .sh file%s from the following commits:\n' \
"${#sh_files[@]}" "${silly_plural[${#sh_files[@]} > 1 ? 1 : 0]}"
printf ' * %s\n' "${commits[@]}"
if ((${#sh_files_staged[@]})); then if ((${#sh_files_staged[@]})); then
printf ' Found %u .sh file%s in staging area:\n' \
"${#sh_files_staged[@]}" "${silly_plural[${#sh_files_staged[@]} > 1 ? 1 : 0]}"
printf ' * %s\n' "${sh_files_staged[@]}"
sh_files+=("${sh_files_staged[@]}") sh_files+=("${sh_files_staged[@]}")
fi fi
printf ' Running %s against the following file%s:\n' "$shfmt" "${silly_plural[${#sh_files[@]} > 1 ? 1 : 0]}"
printf ' * %s\n' "${sh_files[@]}"
shfmt_cmdline+=(-i 0) # indent_style = tab|indent_size = 0 shfmt_cmdline+=(-i 0) # indent_style = tab|indent_size = 0
shfmt_cmdline+=(-bn) # binary_next_line = true shfmt_cmdline+=(-bn) # binary_next_line = true
shfmt_cmdline+=(-ci) # switch_case_indent = true shfmt_cmdline+=(-ci) # switch_case_indent = true