[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 66fe46b 03/18: Resolve more shellcheck "SC111
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 66fe46b 03/18: Resolve more shellcheck "SC1117" warnings |
Date: |
Wed, 29 May 2019 18:49:07 -0400 (EDT) |
branch: master
commit 66fe46b85a63a552925fcc4b4d300034265c22fe
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Resolve more shellcheck "SC1117" warnings
Commit e91fdebd1 purported to resolve "all" such warnings, but at that
time shellcheck had been run only on scripts in the src/ directory.
Today, fixed scripts in subdirectories, makefiles, and flat-text files
as well.
---
gwc/develop1.txt | 4 ++--
gwc/develop2.txt | 2 +-
hooks/commit-msg | 4 ++--
hooks/pre-commit | 4 ++--
workhorse.make | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/gwc/develop1.txt b/gwc/develop1.txt
index 8d6a775..7b78e50 100644
--- a/gwc/develop1.txt
+++ b/gwc/develop1.txt
@@ -175,13 +175,13 @@ cd /opt/lmi/src/lmi
make $coefficiency install check_physical_closure >../log 2>&1
make $coefficiency cgi_tests cli_tests >../log 2>&1
make $coefficiency system_test >../log 2>&1
-make $coefficiency unit_tests 2>&1 | tee >(grep '\*\*\*') >(grep '????')
>(grep '!!!!' --count | xargs printf "%d tests succeeded\n") >../log
+make $coefficiency unit_tests 2>&1 | tee >(grep '\*\*\*') >(grep '????')
>(grep '!!!!' --count | xargs printf '%d tests succeeded\n') >../log
# other build types
make $coefficiency all build_type=so_test USE_SO_ATTRIBUTES=1 2>&1 |less -S
make $coefficiency cgi_tests cli_tests build_type=safestdlib 2>&1 |less -S
-make $coefficiency unit_tests build_type=safestdlib 2>&1 | tee >(grep
'\*\*\*') >(grep '????') >(grep '!!!!' --count | xargs printf "%d tests
succeeded\n") >../log
+make $coefficiency unit_tests build_type=safestdlib 2>&1 | tee >(grep
'\*\*\*') >(grep '????') >(grep '!!!!' --count | xargs printf '%d tests
succeeded\n') >../log
# Run a single unit test
diff --git a/gwc/develop2.txt b/gwc/develop2.txt
index b6fb180..db594a1 100644
--- a/gwc/develop2.txt
+++ b/gwc/develop2.txt
@@ -85,7 +85,7 @@ printf "forcing correct permissions "
printf "$d..." \
&& find ./$d -maxdepth 1 -type f -not -name '*.sh' -not -name '*.sed' |
xargs chmod -x \
)done; \
-printf "all permissions forced\n"
+printf '%s\n' "all permissions forced"
# (2) Test concinnity. The git pre-commit hook shows filtered output;
# this command shows the same thing, unfiltered so that the diagnostics
diff --git a/hooks/commit-msg b/hooks/commit-msg
index e9a6f6e..368a768 100755
--- a/hooks/commit-msg
+++ b/hooks/commit-msg
@@ -36,8 +36,8 @@ z=$(sed -n -e "$sed_script" "$1")
if [ -n "$z" ]; then
printf '\n%s\n' "$z"
- printf "COMMIT ABORTED\n"
+ printf '%s\n' "COMMIT ABORTED"
exit 1
fi
-printf "okay\n"
+printf '%s\n' "okay"
diff --git a/hooks/pre-commit b/hooks/pre-commit
index 94cad53..8a1f611 100755
--- a/hooks/pre-commit
+++ b/hooks/pre-commit
@@ -40,7 +40,7 @@ check_concinnity()
)
if [ -n "$output" ]; then
printf '\n%s\n' "$output"
- printf "COMMIT ABORTED\n"
+ printf '%s\n' "COMMIT ABORTED"
exit 1
fi
}
@@ -52,4 +52,4 @@ printf "[toplevel]..."
check_concinnity "$toplevel"
printf "hooks..."
check_concinnity "$toplevel/hooks"
-printf "okay\n"
+printf '%s\n' "okay"
diff --git a/workhorse.make b/workhorse.make
index ce1fd82..23ba3af 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -1304,7 +1304,7 @@ run_unit_tests: unit_tests_not_built $(addsuffix
-run,$(unit_test_targets))
.PHONY: %$(EXEEXT)-run
%$(EXEEXT)-run:
- @printf "\nRunning $*:\n"
+ @printf '\n%s\n' "Running $*:"
@-$(PERFORM) ./$* --accept
################################################################################
- [lmi-commits] [lmi] master updated (e503910 -> b30b5db), Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 0d8f53e 02/18: Resolve shellcheck "SC1117" warning, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 1d9b9a6 04/18: Deduplicate, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 0e9da3a 01/18: Use Ubuntu 18.04 only for WSL, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 66fe46b 03/18: Resolve more shellcheck "SC1117" warnings,
Greg Chicares <=
- [lmi-commits] [lmi] master a4ee62f 07/18: Suppress certain shellcheck warnings, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master b25a732 06/18: Resolve all shellcheck "SC2038" warnings, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master d52c37f 09/18: Resolve a shellcheck "SC2034" warning, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master ee293d1 10/18: Update certain URLs, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 19c0946 13/18: Copy compiler runtime files in one makefile target only, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 3873eb0 15/18: Fix defect committed 20190521T2101: tested 'md5sums' in wrong directory, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master c40f2f8 14/18: Routinely run shellcheck, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master aebe56b 17/18: Don't copy compiler runtime files to build directory, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 9b9978f 16/18: Avoid 'ls --classify', Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master f4cb231 08/18: Remove space after '#!', Greg Chicares, 2019/05/29