Skip to content

Commit 270d3bf

Browse files
committed
Add sh file checks and fix lints
1 parent 9fa4828 commit 270d3bf

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

docker/app/purge-cache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
#
88
# {"files":[]}
99

10-
body="$1"
11-
api_token=
12-
zone_id=
10+
# body="$1"
11+
# api_token=
12+
# zone_id=
1313

1414
# curl -XPOST \
1515
# -H "Content-Type: application/json" \

docker/app/run-test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ mix format --check-formatted
1111

1212
# Sleep to allow OpenSearch to finish initializing
1313
# if it's not done doing whatever it does yet
14-
echo -n "Waiting for OpenSearch"
14+
printf "Waiting for OpenSearch"
1515

1616
until wget -qO - opensearch:9200; do
17-
echo -n "."
17+
printf "."
1818
sleep 2
1919
done
2020

scripts/shellcheck.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/usr/bin/env bash
2+
#
3+
# This script runs shellcheck on all shell scripts in the repository.
4+
# It exists because shellcheck doesn't attempt to automatically discover
5+
# shell scripts and requires specifying the files paths explicitly.
6+
#
7+
# This is somewhat understandable, because not all shell scripts use
8+
# obvious file extensions like `.sh`. So, we discover such files by
9+
# checking if they have one of the expected shebang lines at the beginning.
210

311
set -euo pipefail
412

@@ -7,6 +15,7 @@ set -euo pipefail
715
function shell_script_files {
816
git ls-files "*.sh"
917
git grep --files-with-matches '^#!/usr/bin/env bash'
18+
git grep --files-with-matches '^#!/usr/bin/env sh'
1019
}
1120

1221
mapfile -t files < <(shell_script_files "$@" | sort --unique)

0 commit comments

Comments
 (0)