Skip to content

Commit 7cbe5e5

Browse files
committed
lint the rest of the shell scripts
1 parent c893810 commit 7cbe5e5

File tree

5 files changed

+23
-24
lines changed

5 files changed

+23
-24
lines changed

.github/workflows/lint-sh.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- uses: luizm/action-sh-checker@v0.9.0
2020
with:
21-
sh_checker_exclude: 'scripts/verify-* scripts/update-* scripts/release.sh'
2221
sh_checker_checkbashisms_enable: true

scripts/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ set -e
33

44
# == would end up with: scripts/release.sh: 5: [: v3.8.1: unexpected operator
55
if [ "$1" = "" ]; then
6-
echo usage: "$0 VERSION"
7-
exit 1
6+
echo usage: "$0 VERSION"
7+
exit 1
88
fi
99

1010
git tag $1

scripts/update-gofmt.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ set -o nounset
66
set -o pipefail
77

88
find_files() {
9-
find . -not \( \
10-
\( \
11-
-wholename '*/vendor/*' \
12-
\) -prune \
13-
\) -name '*.go'
9+
find . -not \( \
10+
\( \
11+
-wholename '*/vendor/*' \
12+
\) -prune \
13+
\) -name '*.go'
1414
}
1515

1616
find_files | xargs gofmt -w -s

scripts/verify-gofmt.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ set -o nounset
66
set -o pipefail
77

88
find_files() {
9-
find . -not \( \
10-
\( \
11-
-wholename '*/vendor/*' \
12-
\) -prune \
13-
\) -name '*.go'
9+
find . -not \( \
10+
\( \
11+
-wholename '*/vendor/*' \
12+
\) -prune \
13+
\) -name '*.go'
1414
}
1515

1616
bad_files=$(find_files | xargs gofmt -d -s 2>&1)
1717
if [[ -n "${bad_files}" ]]; then
18-
echo "${bad_files}" >&2
19-
echo >&2
20-
echo "Run ./hack/update-gofmt.sh" >&2
21-
exit 1
18+
echo "${bad_files}" >&2
19+
echo >&2
20+
echo "Run ./hack/update-gofmt.sh" >&2
21+
exit 1
2222
fi

scripts/verify-staticcheck.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ set -o nounset
55
set -o pipefail
66

77
find_packages() {
8-
find . -not \( \
9-
\( \
10-
-wholename '*/vendor/*' \
11-
\) -prune \
12-
\) -name '*.go' -exec dirname '{}' ';' | sort -u
8+
find . -not \( \
9+
\( \
10+
-wholename '*/vendor/*' \
11+
\) -prune \
12+
\) -name '*.go' -exec dirname '{}' ';' | sort -u
1313
}
1414

1515
errors="$(find_packages | xargs -I@ bash -c "staticcheck @")"
1616
if [[ -n "${errors}" ]]; then
17-
echo "${errors}"
18-
exit 1
17+
echo "${errors}"
18+
exit 1
1919
fi

0 commit comments

Comments
 (0)