From 56f01cfdf2cd71fec76f9a07b1cf61d38428d9e1 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 3 Jun 2018 12:29:34 +1200 Subject: Revamp vint script with blacklist not whitelist --- lint/vim.sh | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/lint/vim.sh b/lint/vim.sh index af9b7877..43eaf4c8 100644 --- a/lint/vim.sh +++ b/lint/vim.sh @@ -1,24 +1,20 @@ -set -- \ - vim/after \ - vim/bundle/auto_cache_dirs \ - vim/bundle/big_file_options \ - vim/bundle/copy_linebreak \ - vim/bundle/fixed_join \ - vim/bundle/insert_suspend_hlsearch \ - vim/bundle/juvenile \ - vim/bundle/mail_mutt \ - vim/bundle/put_blank_lines \ - vim/bundle/sahara \ - vim/bundle/strip_trailing_whitespace \ - vim/bundle/toggle_option_flags \ - vim/bundle/uncap_ex \ - vim/compiler \ - vim/config \ - vim/filetype.vim \ - vim/ftdetect \ - vim/gvimrc \ - vim/indent \ - vim/plugin \ - vim/vimrc +# Build an argument list of checks to make +set -- +for vim in vim/* vim/bundle/* ; do + [ -e "$vim" ] || continue + case $vim in + + # Skip third-party plugins + vim/bundle) ;; + vim/bundle/repeat) ;; + vim/bundle/surround) ;; + + # Check everything else + *) set -- "$@" "$vim" ;; + + esac +done + +# Run check vint -s -- "$@" || exit printf 'Vim configuration linted successfully.\n' -- cgit v1.2.3