mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-04 04:48:38 +00:00
Same-line shellcheck comment explanations
These are obvious even with `git grep shellcheck`.
This commit is contained in:
+3
-8
@@ -11,8 +11,7 @@ input="$(mktemp)"
|
|||||||
output="$(mktemp)"
|
output="$(mktemp)"
|
||||||
errput="$(mktemp)"
|
errput="$(mktemp)"
|
||||||
|
|
||||||
# Immediate expansion is the desired behavior.
|
# shellcheck disable=SC2064 # (Immediate expansion is the desired behavior.)
|
||||||
# shellcheck disable=SC2064
|
|
||||||
trap "rm -f ${o@Q} ${gb@Q} ${input@Q} ${output@Q} ${errput@Q}" EXIT
|
trap "rm -f ${o@Q} ${gb@Q} ${input@Q} ${output@Q} ${errput@Q}" EXIT
|
||||||
|
|
||||||
tests=0
|
tests=0
|
||||||
@@ -91,11 +90,7 @@ for i in *.asm notexist.asm; do
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Stop! This is not a Useless Use Of Cat. Using cat instead of
|
# shellcheck disable=SC2002 # (This use of `cat` intentionally makes the input an unseekable pipe.)
|
||||||
# stdin redirection makes the input an unseekable pipe - a scenario
|
|
||||||
# that's harder to deal with and was broken when the feature was
|
|
||||||
# first implemented.
|
|
||||||
# shellcheck disable=SC2002
|
|
||||||
cat "$i" | "$RGBASM" "${RGBASMFLAGS[@]}" -o "$o" - >"$output" 2>"$errput"
|
cat "$i" | "$RGBASM" "${RGBASMFLAGS[@]}" -o "$o" - >"$output" 2>"$errput"
|
||||||
|
|
||||||
# Use two otherwise unused files for temp storage
|
# Use two otherwise unused files for temp storage
|
||||||
@@ -230,7 +225,7 @@ for variant in '' '.pipe'; do
|
|||||||
if [ -z "$variant" ]; then
|
if [ -z "$variant" ]; then
|
||||||
"$RGBASM" "${RGBASMFLAGS[@]}" -s "$state_features:$state_outname" "$i"/a.asm >"$output" 2>"$errput"
|
"$RGBASM" "${RGBASMFLAGS[@]}" -s "$state_features:$state_outname" "$i"/a.asm >"$output" 2>"$errput"
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2002
|
# shellcheck disable=SC2002 # (This use of `cat` intentionally makes the input an unseekable pipe.)
|
||||||
cat "$i"/a.asm | "$RGBASM" "${RGBASMFLAGS[@]}" -s "$state_features:$state_outname" - >"$output" 2>"$errput"
|
cat "$i"/a.asm | "$RGBASM" "${RGBASMFLAGS[@]}" -s "$state_features:$state_outname" - >"$output" 2>"$errput"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+2
-6
@@ -3,8 +3,7 @@
|
|||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
tmpdir="$(mktemp -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
# Immediate expansion is the desired behavior.
|
# shellcheck disable=SC2064 # (Immediate expansion is the desired behavior.)
|
||||||
# shellcheck disable=SC2064
|
|
||||||
trap "cd; rm -rf ${tmpdir@Q}" EXIT
|
trap "cd; rm -rf ${tmpdir@Q}" EXIT
|
||||||
|
|
||||||
src="$PWD"
|
src="$PWD"
|
||||||
@@ -73,10 +72,7 @@ runTest () {
|
|||||||
eval "$RGBFIX" $flags out.gb '>out.out' '2>out.err'
|
eval "$RGBFIX" $flags out.gb '>out.out' '2>out.err'
|
||||||
subst=out.gb
|
subst=out.gb
|
||||||
elif [[ "$variant" = ' piped' ]]; then
|
elif [[ "$variant" = ' piped' ]]; then
|
||||||
# Stop! This is not a Useless Use Of Cat. Using cat instead of
|
# shellcheck disable=SC2002 # (This use of `cat` intentionally makes the input an unseekable pipe.)
|
||||||
# stdin redirection makes the input an unseekable pipe - a scenario
|
|
||||||
# that's harder to deal with.
|
|
||||||
# shellcheck disable=SC2002
|
|
||||||
cat "$desired_input" | eval "$RGBFIX" $flags - '>out.gb' '2>out.err'
|
cat "$desired_input" | eval "$RGBFIX" $flags - '>out.gb' '2>out.err'
|
||||||
subst='<stdin>'
|
subst='<stdin>'
|
||||||
elif [[ "$variant" = ' output' ]]; then
|
elif [[ "$variant" = ' output' ]]; then
|
||||||
|
|||||||
+1
-2
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
errtmp="$(mktemp)"
|
errtmp="$(mktemp)"
|
||||||
|
|
||||||
# Immediate expansion is the desired behavior.
|
# shellcheck disable=SC2064 # (Immediate expansion is the desired behavior.)
|
||||||
# shellcheck disable=SC2064
|
|
||||||
trap "rm -f ${errtmp@Q} result.{png,1bpp,2bpp,pal,tilemap,attrmap,palmap} out*.png" EXIT
|
trap "rm -f ${errtmp@Q} result.{png,1bpp,2bpp,pal,tilemap,attrmap,palmap} out*.png" EXIT
|
||||||
|
|
||||||
tests=0
|
tests=0
|
||||||
|
|||||||
+1
-2
@@ -10,8 +10,7 @@ outtemp="$(mktemp)"
|
|||||||
outtemp2="$(mktemp)"
|
outtemp2="$(mktemp)"
|
||||||
outtemp3="$(mktemp)"
|
outtemp3="$(mktemp)"
|
||||||
|
|
||||||
# Immediate expansion is the desired behavior.
|
# shellcheck disable=SC2064 # (Immediate expansion is the desired behavior.)
|
||||||
# shellcheck disable=SC2064
|
|
||||||
trap "rm -f ${otemp@Q} ${gbtemp@Q} ${gbtemp2@Q} ${outtemp@Q} ${outtemp2@Q} ${outtemp3@Q}" EXIT
|
trap "rm -f ${otemp@Q} ${gbtemp@Q} ${gbtemp2@Q} ${outtemp@Q} ${outtemp2@Q} ${outtemp3@Q}" EXIT
|
||||||
|
|
||||||
tests=0
|
tests=0
|
||||||
|
|||||||
Reference in New Issue
Block a user