Created
February 8, 2013 06:25
-
-
Save dougireton/4737060 to your computer and use it in GitHub Desktop.
(Broken) chef Syntastic syntax checker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! SyntaxCheckers_chef_IsAvailable() | |
return executable('foodcritic') | |
endfunction | |
function! SyntaxCheckers_chef_GetLocList() | |
" let exe = expand(g:syntastic_ruby_exec) | |
" if !has('win32') | |
" let exe = 'RUBYOPT= ' . exe | |
" endif | |
let makeprg = syntastic#makeprg#build({ | |
\ 'exe': 'foodcritic', | |
\ 'args': '' }) | |
" let errorformat = '%-G%.%#warning: %\(possibly %\)%\?useless use of == in void context' | |
" FC023: Prefer conditional attributes: ./recipes/config.rb:49 | |
let errorformat = '%n: %m: %f:%l' | |
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) | |
endfunction | |
call g:SyntasticRegistry.CreateAndRegisterChecker({ | |
\ 'filetype': 'chef', | |
\ 'name': 'chef'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment