Skip to content

Commit 2228c15

Browse files
committed
Lowercase var names in bin/generate_tests, remove redundant shellcheck disable
1 parent f24c724 commit 2228c15

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/generate_tests

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ use $(dash_to_underscore "$slug")::*;
2929
EOT
3030

3131
# Flattens canonical json, extracts only the objects with a uuid
32-
CASES=$(echo "$CANONICAL_JSON" | jq '[ .. | objects | with_entries(select(.key | IN("uuid", "description", "input", "expected", "property"))) | select(. != {}) | select(has("uuid")) ]')
32+
cases=$(echo "$canonical_json" | jq '[ .. | objects | with_entries(select(.key | IN("uuid", "description", "input", "expected", "property"))) | select(. != {}) | select(has("uuid")) ]')
3333

3434
# Shellcheck doesn't recognize that `case` is not unused
3535
# shellcheck disable=SC2034
36-
jq -c '.[]' <<<"$CASES" | while read -r case; do
36+
jq -c '.[]' <<<"$cases" | while read -r case; do
3737

3838
# Evaluate the bash parts and replace them with their return values
39-
EVAL_TEMPLATE="$(digest_template | sed -e "s/\$(\(.*\))/\$\(\1\)/g")"
40-
EVAL_TEMPLATE="$(eval "echo \"$EVAL_TEMPLATE\"")"
39+
eval_template="$(digest_template | sed -e "s/\$(\(.*\))/\$\(\1\)/g")"
40+
eval_template="$(eval "echo \"$eval_template\"")"
4141

4242
# Turn function name into snake_case
4343
formatted_template=$(echo "$eval_template" | sed -e ':loop' -e 's/\(fn[^(]*\)[ -]/\1_/g' -e 't loop' | sed 's/fn_/fn /')

0 commit comments

Comments
 (0)