less checker: make it handle the new lessc output as well

This commit is contained in:
Martin Grenfell 2011-02-13 14:07:42 +13:00
parent 5dfedf994f
commit db90009a11

View File

@ -21,11 +21,15 @@ endif
function! SyntaxCheckers_less_GetLocList() function! SyntaxCheckers_less_GetLocList()
let makeprg = 'lessc '. shellescape(expand('%')) let makeprg = 'lessc '. shellescape(expand('%'))
let errorformat = '! Syntax %trror: on line %l: %m,%-G%.%#' let errorformat = 'Syntax %trror on line %l,! Syntax %trror: on line %l: %m,%-G%.%#'
let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
for i in errors for i in errors
let i['bufnr'] = bufnr("") let i['bufnr'] = bufnr("")
if empty(i['text'])
let i['text'] = "Syntax error"
endif
endfor endfor
return errors return errors