improve shellcheck comments
This commit is contained in:
1 parent
fa2692b0ab
commit
ed822ba74b
13 files changed
+87
-84
No files matched your search
@@ -37,9 +37,8 @@ done
|
||||
# it either.
|
||||
while :; do
|
||||
read -r -p "Enter a value (any non-digit = quit): "
|
||||
# ^-- SC2143 (style): Use grep -q instead of comparing output with [ -n .. ].
|
||||
# shellcheck disable=SC2143
|
||||
if [[ $(echo "$REPLY" | grep -E '\<[0-9]+\>') ]]; then
|
||||
GREP_REPLY=$(echo "$REPLY" | grep -E '\<[0-9]+\>')
|
||||
if [[ -z $GREP_REPLY ]]; then
|
||||
make clobber CC="$CC" SIZE="$REPLY" alt >/dev/null
|
||||
./shapiro.alt
|
||||
else
|
||||
|
||||
@@ -35,8 +35,8 @@ read -r -n 1 -p "Press any key to run: ./sicherman.alt < sicherman.alt.c | ./sic
|
||||
echo 1>&2
|
||||
# This warning from ShellCheck is incorrect:
|
||||
#
|
||||
# SC2094 (info): Make sure not to read and write the same file in the same pipeline.
|
||||
#
|
||||
# SC2094 (info): Make sure not to read and write the same file in the same pipeline.
|
||||
# https://www.shellcheck.net/wiki/SC2094
|
||||
# shellcheck disable=SC2094
|
||||
./sicherman.alt < sicherman.alt.c | ./sicherman.alt | diff -s - sicherman.alt.c
|
||||
echo "Now explain any differences." 1>&2
|
||||
@@ -36,8 +36,8 @@ echo 1>&2
|
||||
|
||||
# This warning from ShellCheck is incorrect:
|
||||
#
|
||||
# SC2094 (info): Make sure not to read and write the same file in the same pipeline.
|
||||
#
|
||||
#SC2094 (info): Make sure not to read and write the same file in the same pipeline.
|
||||
# https://www.shellcheck.net/wiki/SC2094
|
||||
# shellcheck disable=SC2094
|
||||
./sicherman < sicherman.c | ./sicherman | diff -s - sicherman.c
|
||||
echo "Now explain any differences." 1>&2
|
||||
Reference in new issue
Block a user