Checker stylus/stylint: fix errorformat for version 1.5.7.
This commit is contained in:
parent
e37dca1b48
commit
1c89d2a570
@ -6010,7 +6010,7 @@ Maintainer: LCD 47 <lcd047@gmail.com>
|
||||
"Stylint" is a linter for Stylus (http://learnboost.github.io/stylus). See
|
||||
the project's page at GitHub for details:
|
||||
|
||||
https://github.com/rossPatton/stylint
|
||||
https://github.com/SimenB/stylint
|
||||
|
||||
Syntastic doesn't support "Stylint" version 1.5.7 or later.
|
||||
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-6'
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-7'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
@ -18,22 +18,26 @@ let g:loaded_syntastic_stylus_stylint_checker = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_stylus_stylint_IsAvailable() dict
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
" XXX versions 1.5.7 and later are not supported
|
||||
return !syntastic#util#versionIsAtLeast(self.getVersion(), [1, 5, 7])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_stylus_stylint_GetLocList() dict
|
||||
if !exists('s:stylint_new')
|
||||
let s:stylint_new = syntastic#util#versionIsAtLeast(self.getVersion(), [1, 5, 7])
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({})
|
||||
|
||||
let errorformat =
|
||||
\ '%WWarning: %m,' .
|
||||
\ '%EError: %m,' .
|
||||
\ '%CFile: %f,' .
|
||||
\ '%CLine: %l:%.%#'
|
||||
if s:stylint_new
|
||||
let errorformat =
|
||||
\ '%P%f,' .
|
||||
\ '%-Q,' .
|
||||
\ '%\m%l:%c%\s%\+%t%\%%(rror%\|arning%\)%\s%\+%m%\s%\+%\S%\+%\s%#,' .
|
||||
\ '%\m%l%\s%\+%t%\%%(rror%\|arning%\)%\s%\+%m%\s%\+%\S%\+%\s%#'
|
||||
else
|
||||
let errorformat =
|
||||
\ '%WWarning: %m,' .
|
||||
\ '%EError: %m,' .
|
||||
\ '%CFile: %f,' .
|
||||
\ '%CLine: %l:%.%#'
|
||||
endif
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
|
Loading…
Reference in New Issue
Block a user