diff --git a/syntax_checkers/sh/checkbashisms.vim b/syntax_checkers/sh/checkbashisms.vim new file mode 100644 index 00000000..3f79130d --- /dev/null +++ b/syntax_checkers/sh/checkbashisms.vim @@ -0,0 +1,35 @@ +"============================================================================ +"File: checkbashisms.vim +"Description: Shell script syntax/style checking plugin for syntastic.vim +"Notes: checkbashisms.pl can be downloaded from +" http://debian.inode.at/debian/pool/main/d/devscripts/ +" as part of the devscripts package. +"============================================================================ + +if exists("g:loaded_syntastic_sh_checkbashisms_checker") + finish +endif +let g:loaded_syntastic_sh_checkbashisms_checker=1 + + +function! SyntaxCheckers_sh_checkbashisms_IsAvailable() + return executable('checkbashisms.pl') +endfunction + + +function! SyntaxCheckers_sh_checkbashisms_GetLocList() + let l:makeprg = syntastic#makeprg#build({'exe': 'checkbashisms.pl', 'args': '-fpx'}) + + let l:errorformat = + \ '%Eerror: %f: %m,' . + \ '%Ecannot open script %f for reading: %m,' . + \ '%Wscript %f %m,%C%.# lines,' . + \ '%Wpossible bashism in %f line %l (%m):,%C%.%#,%Z.%#' + + return SyntasticMake({'makeprg': l:makeprg, 'errorformat': l:errorformat}) +endfunction + + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sh', + \ 'name': 'checkbashisms'}) diff --git a/syntax_checkers/tcl/tclsh.vim b/syntax_checkers/tcl/tclsh.vim deleted file mode 100644 index b0b2156d..00000000 --- a/syntax_checkers/tcl/tclsh.vim +++ /dev/null @@ -1,31 +0,0 @@ -"============================================================================ -"File: tclsh.vim -"Description: Syntax checking plugin for syntastic.vim -"Maintainer: Eric Thomas -"License: This program is free software. It comes without any warranty, -" to the extent permitted by applicable law. You can redistribute -" it and/or modify it under the terms of the Do What The Fuck You -" Want To Public License, Version 2, as published by Sam Hocevar. -" See http://sam.zoy.org/wtfpl/COPYING for more details. -" -"============================================================================ - -if exists("g:loaded_syntastic_tcl_tclsh_checker") - finish -endif -let g:loaded_syntastic_tcl_tclsh_checker=1 - -function! SyntaxCheckers_tcl_tclsh_IsAvailable() - return executable('tclsh') -endfunction - -function! SyntaxCheckers_tcl_tclsh_GetLocList() - let makeprg = syntastic#makeprg#build({'exe': 'tclsh'}) - let errorformat = '%f:%l:%m' - - return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) -endfunction - -call g:SyntasticRegistry.CreateAndRegisterChecker({ - \ 'filetype': 'tcl', - \ 'name': 'tclsh'})