From 111c8d9db7798ccccd07157f346f2c039131cfc9 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 31 Oct 2017 20:46:10 +1300 Subject: Revert "Drastically simplify `lint` scripts" I forgot that the `lint` tools here need to check the *built* files, and that that's the reason the `perlcritic` check against the source .pl file was failing. While it's still true that it would be preferable to test the files found in a deterministic order, this branch's attempt to address that issue is pretty much nonsense and can be abandoned. This reverts commit 196155499c04b2c2050302e6575f1bcbbed052f1. --- lint/bash.sh | 8 +------- lint/bin.sh | 3 +-- lint/games.sh | 3 +-- lint/ksh.sh | 8 +++----- lint/sh.sh | 12 ++++++------ lint/urxvt.sh | 3 +-- lint/vim.sh | 13 +++++-------- lint/xinit.sh | 4 +--- 8 files changed, 19 insertions(+), 35 deletions(-) (limited to 'lint') diff --git a/lint/bash.sh b/lint/bash.sh index 4830b90a..2fe1ba13 100644 --- a/lint/bash.sh +++ b/lint/bash.sh @@ -1,7 +1 @@ -shellcheck -e SC1090 -s bash -- \ - bash/bash_completion \ - bash/bash_completion.d/*.bash \ - bash/bash_logout \ - bash/bash_profile \ - bash/bashrc \ - bash/bashrc.d/*.bash +find bash -type f -print -exec shellcheck -e SC1090 -s bash -- {} + diff --git a/lint/bin.sh b/lint/bin.sh index 2c990d2a..0fe82d7a 100644 --- a/lint/bin.sh +++ b/lint/bin.sh @@ -1,2 +1 @@ -shellcheck -e SC1090 -s sh -- \ - bin/*.sh +find bin -type f -name '*.sh' -print -exec shellcheck -e SC1090 -s sh -- {} + diff --git a/lint/games.sh b/lint/games.sh index 772c8678..6e3e3024 100644 --- a/lint/games.sh +++ b/lint/games.sh @@ -1,2 +1 @@ -shellcheck -e SC1090 -s sh -- \ - games/*.sh +find games -type f -name '*.sh' -print -exec shellcheck -e SC1090 -s sh -- {} + diff --git a/lint/ksh.sh b/lint/ksh.sh index fd558727..4cedc6f7 100644 --- a/lint/ksh.sh +++ b/lint/ksh.sh @@ -1,5 +1,3 @@ -shellcheck -e SC1090 -s sh -- \ - ksh/shrc.d/*.sh -shellcheck -e SC1090 -s ksh -- \ - ksh/kshrc \ - ksh/kshrc.d/*.ksh +find ksh \ + -type f -name '*.sh' -exec shellcheck -e SC1090 -s sh -- {} + -o \ + -type f -exec shellcheck -e SC1090 -s ksh -- {} + diff --git a/lint/sh.sh b/lint/sh.sh index 4f796b09..89704c0b 100644 --- a/lint/sh.sh +++ b/lint/sh.sh @@ -1,6 +1,6 @@ -shellcheck -e SC1090 -s sh -- \ - sh/profile \ - sh/profile.d/* \ - sh/shinit \ - sh/shrc \ - sh/shrc.d/* +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 -- {} + diff --git a/lint/urxvt.sh b/lint/urxvt.sh index 7c7b1876..507034be 100644 --- a/lint/urxvt.sh +++ b/lint/urxvt.sh @@ -1,2 +1 @@ -perlcritic --brutal -- \ - urxvt/ext/*.pl +find urxvt/ext -type f ! -name '*.pl' -print -exec perlcritic --brutal -- {} \; diff --git a/lint/vim.sh b/lint/vim.sh index 8197217e..6714ac9a 100644 --- a/lint/vim.sh +++ b/lint/vim.sh @@ -1,8 +1,5 @@ -vint -s -- \ - vim/after/ \ - vim/config/ \ - vim/ftdetect/ \ - vim/ftplugin/ \ - vim/indent/ \ - vim/gvimrc \ - vim/vimrc +for v in vim/* ; do + [ "$v" != vim/bundle ] || continue + printf '%s\n' "$v" + vint -s -- "$v" +done diff --git a/lint/xinit.sh b/lint/xinit.sh index cebb59a7..b5ff6937 100644 --- a/lint/xinit.sh +++ b/lint/xinit.sh @@ -1,3 +1 @@ -shellcheck -e SC1090 -s sh -- \ - X/xinitrc \ - X/xinitrc.d/*.sh +find X -type f \( -name xinitrc -o -name '*.sh' \) -print -exec shellcheck -e SC1090 -s sh -- {} + -- cgit v1.2.3