-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlint.do
More file actions
48 lines (44 loc) · 1.04 KB
/
lint.do
File metadata and controls
48 lines (44 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# shellcheck shell=sh
# vi:et lbr noet sw=2 ts=2 tw=79 wrap
# SPDX-FileCopyrightText: 2024-2025 David Rabkin
# SPDX-License-Identifier: 0BSD
redo-ifchange \
./.github/*.yml \
./.github/workflows/*.yml \
./*.do \
./app/* \
./README.adoc
# shellcheck disable=SC2034 # Variable appears unused.
readonly \
BASE_APP_VERSION=0.9.20250906 \
BSH=/usr/local/bin/base.sh
[ -r "$BSH" ] || {
printf >&2 Install\ Shellbase.\\n
exit 1
}
set -- "$@" --quiet
# shellcheck disable=SC1090 # File not following.
. "$BSH"
cmd_exists actionlint && actionlint
find . \
-name '*.do' \
-or \
-name '*' -not -name pass -path '*/app/*' |
while read -r f; do
cmd_exists shellcheck && shellcheck "$f"
cmd_exists shfmt && shfmt -d "$f"
# Gracefully handle missing last tool without failing the script.
:
done
cmd_exists reuse && reuse lint
cmd_exists typos && typos
cmd_exists vale && {
vale sync
vale ./README.adoc
}
cmd_exists yamllint &&
yamllint \
./.github/*.yml \
./.github/workflows/*.yml
# Gracefully handle missing last tool without failing the script.
: