Merge pull request #574 from aswna/master

Added new sh checker: checkbashisms.
This commit is contained in:
Martin Grenfell 2013-03-26 12:52:01 -07:00
commit 818b4a5365
2 changed files with 35 additions and 31 deletions

View File

@ -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'})

View File

@ -1,31 +0,0 @@
"============================================================================
"File: tclsh.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Eric Thomas <eric.l.m.thomas at gmail dot com>
"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'})