less: simplify 1.2 errorformat and split errorformat up

* remove some unneeded escaping of spaces and colons from the 1.2
  errorformat
* split the pre and post 1.2 errorformats up and comment them for future
  clarity
This commit is contained in:
Martin Grenfell 2012-01-19 12:59:40 +00:00
parent 42ea3426d1
commit fe5b8989af

View File

@ -25,7 +25,12 @@ endif
function! SyntaxCheckers_less_GetLocList()
let makeprg = 'lessc '. g:syntastic_less_options .' '. shellescape(expand('%')) . ' /dev/null'
let errorformat = 'ParseError:\ Syntax\ Error\ on\ line\ %[0-9]%#\ in\ %f\:%l\:%c, Syntax %trror on line %l in %f,Syntax %trror on line %l,! Syntax %trror: on line %l: %m,%-G%.%#'
"lessc >= 1.2
let errorformat = 'ParseError: Syntax Error on line %[0-9]%# in %f:%l:%c'
"lessc < 1.2
let errorformat .= ', Syntax %trror on line %l in %f,Syntax %trror on line %l,! Syntax %trror: on line %l: %m,%-G%.%#'
return SyntasticMake({ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'defaults': {'bufnr': bufnr(""), 'text': "Syntax error"} })