diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-03 12:29:34 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-03 12:29:34 +1200 |
commit | 56f01cfdf2cd71fec76f9a07b1cf61d38428d9e1 (patch) | |
tree | 2446c8e28d11e95bd615c6367ec5b69628778daf /lint | |
parent | Add missing vint targets (diff) | |
download | dotfiles-56f01cfdf2cd71fec76f9a07b1cf61d38428d9e1.tar.gz dotfiles-56f01cfdf2cd71fec76f9a07b1cf61d38428d9e1.zip |
Revamp vint script with blacklist not whitelist
Diffstat (limited to 'lint')
-rw-r--r-- | lint/vim.sh | 40 |
1 files 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' |