From e7213cb7cbd3149377cf6c08dc9c3813c99743f8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 31 Oct 2017 22:32:49 +1300 Subject: 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. --- lint/ksh.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lint/ksh.sh') diff --git a/lint/ksh.sh b/lint/ksh.sh index 4cedc6f7..102e0e54 100644 --- a/lint/ksh.sh +++ b/lint/ksh.sh @@ -1,3 +1,6 @@ -find ksh \ - -type f -name '*.sh' -exec shellcheck -e SC1090 -s sh -- {} + -o \ - -type f -exec shellcheck -e SC1090 -s ksh -- {} + +set \ + ksh/kshrc \ + ksh/kshrc.d/*.ksh +shellcheck -e SC1090 -s ksh -- "$@" || exit +shellcheck -e SC1090 -s sh -- ksh/shrc.d/ksh.sh || exit +printf 'Korn shell dotfiles linted successfully.\n' -- cgit v1.2.3