Skip to content

Commit

Permalink
Add redo lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rdavid committed Jan 6, 2024
1 parent 62173bb commit f269f7a
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/styles/Vocab/Base/accept.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Matveev
Rabkin
Sergey
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
.github/styles/proselint
.github/styles/Readability
.github/styles/write-good
.redo
1
clean
lint
8 changes: 8 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ git clone [email protected]:rdavid/toolbox.git &&
./toolbox/app/install
----

== Test

The project uses Daniel J. Bernstein's build system {url-redo}[`redo`].
You can install Sergey Matveev's {url-goredo}[`goredo`] implementation.
`redo lint` applies the following linters to the source files:
{url-shellcheck}[`shellcheck`], {url-shfmt}[`shfmt`], {url-typos}[`typos`],
{url-vale}[`vale`], {url-yamllint}[`yamllint`].

== License

`toolbox` is copyright {url-cv}[David Rabkin] and available under a
Expand Down
4 changes: 4 additions & 0 deletions all.do
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# shellcheck shell=sh
# vi:et lbr noet sw=2 ts=2 tw=79 wrap
# Copyright 2024 David Rabkin
redo-ifchange lint
4 changes: 4 additions & 0 deletions clean.do
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# shellcheck shell=sh
# vi:et lbr noet sw=2 ts=2 tw=79 wrap
# Copyright 2024 David Rabkin
rm -f 1 clean lint
35 changes: 35 additions & 0 deletions lint.do
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# shellcheck shell=sh
# vi:et lbr noet sw=2 ts=2 tw=79 wrap
# Copyright 2024 David Rabkin
redo-ifchange \
./*.do \
.github/*.yml \
.github/workflows/*.yml \
app/* \
README.adoc
# shellcheck disable=SC2034 # Variable appears unused.
readonly \
BASE_APP_VERSION=0.9.20240106 \
BASE_MIN_VERSION=0.9.20231212 \
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 shellcheck &&
find app -name "*" ! -path app ! -name pass -exec shellcheck {} +
cmd_exists shfmt && {
shfmt -d ./*.do
find app -name "*" ! -path app ! -name pass -exec shfmt -d {} +
}
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

0 comments on commit f269f7a

Please sign in to comment.