12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- if exists('g:loaded_syntastic_html_htmlhint_checker')
- finish
- endif
- let g:loaded_syntastic_html_htmlhint_checker = 1
- let s:save_cpo = &cpo
- set cpo&vim
- function! SyntaxCheckers_html_htmlhint_IsAvailable() dict
- if !executable(self.getExec())
- return 0
- endif
- return syntastic#util#versionIsAtLeast(self.getVersion(), [0, 9, 13])
- endfunction
- function! SyntaxCheckers_html_htmlhint_GetLocList() dict
- let makeprg = self.makeprgBuild({ 'args_before': '--format unix' })
- let errorformat = '%f:%l:%c: %m'
- return SyntasticMake({
- \ 'makeprg': makeprg,
- \ 'errorformat': errorformat,
- \ 'returns': [0, 1] })
- endfunction
- call g:SyntasticRegistry.CreateAndRegisterChecker({
- \ 'filetype': 'html',
- \ 'name': 'htmlhint'})
- let &cpo = s:save_cpo
- unlet s:save_cpo
|