lmi-commits
[Top][All Lists]
Advanced

[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
 
 
################################################################################



reply via email to

[Prev in Thread] Current Thread [Next in Thread]