-
-
Save scrooloose/4737848 to your computer and use it in GitHub Desktop.
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_foodcritic_IsAvailable() | |
| return executable('foodcritic') | |
| endfunction | |
| function! SyntaxCheckers_chef_foodcritic_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': 'foodcritic'}) |
Author
Author
Actually, I have just renamed it so that filetype=chef and name=foodcritic.
The point of having names for syntax checkers is to support different checkers for the same filetype - e.g. javascript has jshint, jslint, gjslint, jsl and closurecompiler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, saw your message on irc. Check out my fork :)
The name convention is
SyntaxCheckers_filetype_name_Functionso you have to repeat chef twice here.