diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-15 21:21:09 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-15 21:21:09 +0100 |
commit | 4c5e97dd1c57082c8106556150a49f11760e55b0 (patch) | |
tree | 8a717a034a4eeea09b935ac173b807b5fa920f8c /autoload | |
parent | 78a7df52c0326d51846f262f8c3bc4e231f21659 (diff) | |
download | ale-4c5e97dd1c57082c8106556150a49f11760e55b0.zip |
Fix #555 - Handle csslint errors without groups
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/css.vim | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/autoload/ale/handlers/css.vim b/autoload/ale/handlers/css.vim index 37ee5eea..7c4d3d14 100644 --- a/autoload/ale/handlers/css.vim +++ b/autoload/ale/handlers/css.vim @@ -10,17 +10,20 @@ function! ale#handlers#css#HandleCSSLintFormat(buffer, lines) abort " " These errors can be very massive, so the type will be moved to the front " so you can actually read the error type. - let l:pattern = '^.*: line \(\d\+\), col \(\d\+\), \(Error\|Warning\) - \(.\+\) (\([^)]\+\))$' + let l:pattern = '\v^.*: line (\d+), col (\d+), (Error|Warning) - (.+)$' let l:output = [] for l:match in ale#util#GetMatches(a:lines, l:pattern) let l:text = l:match[4] let l:type = l:match[3] - let l:errorGroup = l:match[5] + + let l:group_match = matchlist(l:text, '\v^(.+) \((.+)\)$') " Put the error group at the front, so we can see what kind of error " it is on small echo lines. - let l:text = '(' . l:errorGroup . ') ' . l:text + if !empty(l:group_match) + let l:text = '(' . l:group_match[2] . ') ' . l:group_match[1] + endif call add(l:output, { \ 'lnum': l:match[1] + 0, |