From 37d43c8e18a5076ddf367c5936e4da50b43ae5dd Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sun, 21 Jan 2024 04:54:21 -0800 Subject: [PATCH] Deal with shellcheck warnings in 1985/sicherman In these scripts, try.sh and try.alt.sh, the warning triggered is entirely incorrect and not a problem so they are now disabled. --- 1985/sicherman/try.alt.sh | 5 +++++ 1985/sicherman/try.sh | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/1985/sicherman/try.alt.sh b/1985/sicherman/try.alt.sh index de1e3ebcc..90ac47ddc 100755 --- a/1985/sicherman/try.alt.sh +++ b/1985/sicherman/try.alt.sh @@ -33,5 +33,10 @@ echo 1>&2 read -r -n 1 -p "Press any key to run: ./sicherman.alt < sicherman.alt.c | ./sicherman.alt | diff -s - sicherman.alt.c: " 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. +# +# shellcheck disable=SC2094 ./sicherman.alt < sicherman.alt.c | ./sicherman.alt | diff -s - sicherman.alt.c echo "Now explain any differences." 1>&2 diff --git a/1985/sicherman/try.sh b/1985/sicherman/try.sh index 1192b28b5..b515bd274 100755 --- a/1985/sicherman/try.sh +++ b/1985/sicherman/try.sh @@ -33,5 +33,11 @@ echo 1>&2 read -r -n 1 -p "Press any key to run: ./sicherman < sicherman.c | ./sicherman | diff -s - sicherman.c: " 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. +# +# shellcheck disable=SC2094 ./sicherman < sicherman.c | ./sicherman | diff -s - sicherman.c echo "Now explain any differences." 1>&2