-
Notifications
You must be signed in to change notification settings - Fork 0
/
lint.do
40 lines (38 loc) · 978 Bytes
/
lint.do
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
# shellcheck shell=sh
# vi:et lbr noet sw=2 ts=2 tw=79 wrap
# Copyright 2022-2023 David Rabkin
redo-ifchange \
./*.do \
.github/*.yml \
.github/workflows/*.yml \
app/* \
container/*/Containerfile \
lib/* \
Makefile \
README.adoc
BSH="$(
CDPATH='' cd -- "$(dirname -- "$0" 2>&1)" 2>&1 && pwd -P 2>&1
)"/lib/base.sh || {
err=$?
printf >&2 %s\\n "$BSH"
exit $err
}
# shellcheck disable=SC2034 # Variable appears unused.
readonly \
BASE_APP_VERSION=0.9.20231225 \
BASE_MIN_VERSION=0.9.20231212 \
BSH
set -- "$@" --quiet
# shellcheck disable=SC1090 # File not following.
. "$BSH"
cmd_exists checkmake && checkmake Makefile
cmd_exists hadolint && hadolint container/*/Containerfile
cmd_exists shellcheck && shellcheck ./*.do app/* lib/*
cmd_exists shfmt && shfmt -d ./*.do app/* lib/*
cmd_exists typos && typos
cmd_exists vale && {
vale sync >/dev/null 2>&1 || :
vale README.adoc
}
cmd_exists yamllint && yamllint .github/*.yml .github/workflows/*.yml
./app/update