diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index 38367654..d9c03e0f 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -6010,7 +6010,7 @@ Maintainer: LCD 47 "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. diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 3d544930..8824df21 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -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 diff --git a/syntax_checkers/stylus/stylint.vim b/syntax_checkers/stylus/stylint.vim index 6ac91b65..b32b745e 100644 --- a/syntax_checkers/stylus/stylint.vim +++ b/syntax_checkers/stylus/stylint.vim @@ -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,