aboutsummaryrefslogtreecommitdiff
path: root/lint/sh.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-31 22:32:49 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-31 22:32:49 +1300
commite7213cb7cbd3149377cf6c08dc9c3813c99743f8 (patch)
treed754980f8c170cd260ea0984cadd9e295851a0b3 /lint/sh.sh
parentUse shell name not command in check/lint messages (diff)
downloaddotfiles-e7213cb7cbd3149377cf6c08dc9c3813c99743f8.tar.gz
dotfiles-e7213cb7cbd3149377cf6c08dc9c3813c99743f8.zip
Tidy and correct linting for all three shells
Reduce each one to target only the dotfiles specifically for that shell, as opposed to previously where for example the `check-sh` target was checking shell shims in for `mpd` and `plenv`. I'm still not completely sure that's the right approach, but it's at least less conceptually muddy than what we had before. Notably, the check and lint for Korn shell includes a single POSIX shell script file in its `shrc.d` subdirectory, so that check is executed separately.
Diffstat (limited to 'lint/sh.sh')
-rw-r--r--lint/sh.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/lint/sh.sh b/lint/sh.sh
index 89704c0b..c1c972c8 100644
--- a/lint/sh.sh
+++ b/lint/sh.sh
@@ -1,6 +1,8 @@
-find sh \
- keychain/profile.d keychain/shrc.d \
- ksh/shrc.d \
- mpd/profile.d \
- plenv/profile.d plenv/shrc.d \
- -type f -print -exec shellcheck -e SC1090 -s sh -- {} +
+set \
+ sh/profile \
+ sh/profile.d/*.sh \
+ sh/shinit \
+ sh/shrc \
+ sh/shrc.d/*.sh
+shellcheck -e SC1090 -s sh -- "$@" || exit
+printf 'POSIX shell dotfiles linted successfully.\n'