Commit 4bd48a3d authored by Seth Howell's avatar Seth Howell Committed by Tomasz Zawadzki
Browse files

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: default avatarSeth 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent cac5022e
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -261,21 +261,12 @@ if [ -n "$shfmt" ]; then
	)

	if ((${#sh_files[@]})); then
		printf 'Checking .sh formatting style...\n\n'
		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[@]}"
		printf 'Checking .sh formatting style...'

		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[@]}")
		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+=(-bn)      # binary_next_line = true
		shfmt_cmdline+=(-ci)      # switch_case_indent = true