aboutsummaryrefslogtreecommitdiff
path: root/lint
diff options
context:
space:
mode:
Diffstat (limited to 'lint')
-rw-r--r--lint/bash.sh10
-rw-r--r--lint/bin.sh20
-rw-r--r--lint/games.sh8
-rw-r--r--lint/ksh.sh9
-rw-r--r--lint/sh.sh14
-rw-r--r--lint/urxvt.sh7
-rw-r--r--lint/vim.sh15
-rw-r--r--lint/xinit.sh6
8 files changed, 70 insertions, 19 deletions
diff --git a/lint/bash.sh b/lint/bash.sh
index 2fe1ba13..6457da35 100644
--- a/lint/bash.sh
+++ b/lint/bash.sh
@@ -1 +1,9 @@
-find bash -type f -print -exec shellcheck -e SC1090 -s bash -- {} +
+set \
+ bash/bash_completion \
+ bash/bash_completion.d/*.bash \
+ bash/bash_logout \
+ bash/bash_profile \
+ bash/bashrc \
+ bash/bashrc.d/*.bash
+shellcheck -e SC1090 -s bash -- "$@" || exit
+printf 'GNU Bash dotfiles linted successfully.\n'
diff --git a/lint/bin.sh b/lint/bin.sh
index 0fe82d7a..6037ca55 100644
--- a/lint/bin.sh
+++ b/lint/bin.sh
@@ -1 +1,19 @@
-find bin -type f -name '*.sh' -print -exec shellcheck -e SC1090 -s sh -- {} +
+# POSIX sh
+set --
+for bin in bin/*.sh ; do
+ set -- "$@" "${bin%.sh}"
+done
+shellcheck -e SC1090 -- "$@" || exit
+printf 'POSIX shell binscripts linted successfully.\n'
+
+# GNU Bash
+if command -v bash >/dev/null 2>&1 ; then
+ set --
+ for bin in bin/*.bash ; do
+ set -- "$@" "${bin%.bash}"
+ done
+ shellcheck -e SC1090 -- "$@" || exit
+ printf 'GNU Bash binscripts linted successfully.\n'
+else
+ printf 'bash(1) not found, skipping GNU Bash lint.\n'
+fi
diff --git a/lint/games.sh b/lint/games.sh
index 6e3e3024..6d51ba0d 100644
--- a/lint/games.sh
+++ b/lint/games.sh
@@ -1 +1,7 @@
-find games -type f -name '*.sh' -print -exec shellcheck -e SC1090 -s sh -- {} +
+# POSIX sh
+set --
+for game in games/*.sh ; do
+ set -- "$@" "${game%.sh}"
+done
+shellcheck -e SC1090 -- "$@" || exit
+printf 'POSIX shell games linted successfully.\n'
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'
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'
diff --git a/lint/urxvt.sh b/lint/urxvt.sh
index 507034be..477157f7 100644
--- a/lint/urxvt.sh
+++ b/lint/urxvt.sh
@@ -1 +1,6 @@
-find urxvt/ext -type f ! -name '*.pl' -print -exec perlcritic --brutal -- {} \;
+set --
+for pl in urxvt/ext/*.pl ; do
+ set -- "$@" "${pl%.pl}"
+done
+perlcritic --brutal -- "${pl%.pl}"
+printf 'URxvt Perl extensions linted successfully.\n'
diff --git a/lint/vim.sh b/lint/vim.sh
index 6714ac9a..d876d770 100644
--- a/lint/vim.sh
+++ b/lint/vim.sh
@@ -1,5 +1,10 @@
-for v in vim/* ; do
- [ "$v" != vim/bundle ] || continue
- printf '%s\n' "$v"
- vint -s -- "$v"
-done
+set -- \
+ vim/after \
+ vim/config \
+ vim/ftdetect \
+ vim/ftplugin \
+ vim/gvimrc \
+ vim/indent \
+ vim/vimrc
+vint -s -- "$@" || exit
+printf 'Vim configuration linted successfully.\n'
diff --git a/lint/xinit.sh b/lint/xinit.sh
index b5ff6937..b2718874 100644
--- a/lint/xinit.sh
+++ b/lint/xinit.sh
@@ -1 +1,5 @@
-find X -type f \( -name xinitrc -o -name '*.sh' \) -print -exec shellcheck -e SC1090 -s sh -- {} +
+set \
+ X/xinitrc \
+ X/xinitrc.d/*.sh
+shellcheck -e SC1090 -s sh -- "$@"
+printf 'Xinit startup scripts linted successfully.\n'