Skip to content

Instantly share code, notes, and snippets.

@kamicut
Created May 13, 2015 18:28
Show Gist options
  • Save kamicut/cc672cd59e50d56e9dae to your computer and use it in GitHub Desktop.
Save kamicut/cc672cd59e50d56e9dae to your computer and use it in GitHub Desktop.
semistandard.vim
if exists('g:loaded_syntastic_javascript_semistandard_checker')
finish
endif
let g:loaded_syntastic_javascript_semistandard_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_javascript_semistandard_IsAvailable() dict
if !executable(self.getExec())
return 0
endif
return syntastic#util#versionIsAtLeast(self.getVersion(), [2, 6, 1])
endfunction
function! SyntaxCheckers_javascript_semistandard_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args': '-v' })
let errorformat = ' %f:%l:%c: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
\ 'defaults': {'type': 'W'},
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'javascript',
\ 'name': 'semistandard'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment