aboutsummaryrefslogtreecommitdiff
path: root/lint/ksh.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-31 20:28:49 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-31 20:45:48 +1300
commit196155499c04b2c2050302e6575f1bcbbed052f1 (patch)
tree6f0d9d3daf2d20aea38983d390f5ea89487c2c00 /lint/ksh.sh
parentMerge branch 'release/v0.1.0' into develop (diff)
downloaddotfiles-196155499c04b2c2050302e6575f1bcbbed052f1.tar.gz
dotfiles-196155499c04b2c2050302e6575f1bcbbed052f1.zip
Drastically simplify `lint` scripts
Using find(1) to run the appropriate lint program over a set of files allows us to be terse and deal a little more dynamically with new files placed in the directories, but the downsides are that it's error-prone and that the order of testing is not predictable, and we'd ideally like the testing to be a little more deterministic than that. Case in point: writing the code for this commit unintentionally uncovered a longstanding issue where the URxvt Perl script `select.pl` was actually not being checked at all, due to an unneeded exclamation mark inverting the `-name` test for `*.pl` files. `select.pl` is presently not passing `perlcritic --brutal` on my machine, and likely has not been compliant since as early as commit 5000365 in March this year: >commit 500036564541ff2d65a7b2f6f6f556202d72d6ce >Author: Tom Ryder <tom@sanctum.geek.nz> >Date: Fri Mar 24 11:01:05 2017 > > Lots of Makefile tidying > > ... > * Favour find(1) calls over shell loops > ... This commit also more clearly delineates between the language being "linted" and the target for which it's being linted. The latter is likely more desirable. This needs clarification.
Diffstat (limited to 'lint/ksh.sh')
-rw-r--r--lint/ksh.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/lint/ksh.sh b/lint/ksh.sh
index 4cedc6f7..fd558727 100644
--- a/lint/ksh.sh
+++ b/lint/ksh.sh
@@ -1,3 +1,5 @@
-find ksh \
- -type f -name '*.sh' -exec shellcheck -e SC1090 -s sh -- {} + -o \
- -type f -exec shellcheck -e SC1090 -s ksh -- {} +
+shellcheck -e SC1090 -s sh -- \
+ ksh/shrc.d/*.sh
+shellcheck -e SC1090 -s ksh -- \
+ ksh/kshrc \
+ ksh/kshrc.d/*.ksh