Skip to content

Commit 6ad9abf

Browse files
committed
update comments in bats-extra.bash files
1 parent 461309f commit 6ad9abf

96 files changed

Lines changed: 192 additions & 192 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

exercises/practice/acronym/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

exercises/practice/affine-cipher/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

exercises/practice/all-your-base/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

exercises/practice/allergies/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

exercises/practice/anagram/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

exercises/practice/armstrong-numbers/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

exercises/practice/atbash-cipher/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

exercises/practice/beer-song/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

exercises/practice/binary-search/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

exercises/practice/bob/bats-extra.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ assert_output() {
369369
| fail
370370
fi
371371
elif (( is_mode_regexp )); then
372-
# glennj: I don't know what command's status `$?` is at this point
373-
# shellcheck disable=SC2319 # (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
372+
# shellcheck disable=SC2319 # (warning) `$?` in a conditional expression: https://github.com/koalaman/shellcheck/wiki/SC2319
374373
if [[ '' =~ $expected ]] || (( $? == 2 )); then
374+
# the regex matches an empty string or it is syntactically incorrect.
375375
echo "Invalid extended regular expression: \`$expected'" \
376376
| batslib_decorate 'ERROR: assert_output' \
377377
| fail

0 commit comments

Comments
 (0)