diff options
author | w0rp <devw0rp@gmail.com> | 2017-07-03 16:13:01 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-07-03 16:13:10 +0100 |
commit | fd6f05c9ea7e3ff0ce7a86354b170e954e2e05b6 (patch) | |
tree | 6e5783978ff316ed9d11b76d9de80c9c1f367f38 /autoload | |
parent | 5a3cfbbdf50bc3e82e8ceca486a6bbda201f99d9 (diff) | |
download | ale-fd6f05c9ea7e3ff0ce7a86354b170e954e2e05b6.zip |
Report exceptions thrown for stylelint
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/css.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/autoload/ale/handlers/css.vim b/autoload/ale/handlers/css.vim index 28385986..71eaf2ce 100644 --- a/autoload/ale/handlers/css.vim +++ b/autoload/ale/handlers/css.vim @@ -37,6 +37,18 @@ function! ale#handlers#css#HandleCSSLintFormat(buffer, lines) abort endfunction function! ale#handlers#css#HandleStyleLintFormat(buffer, lines) abort + let l:exception_pattern = '\v^Error:' + + for l:line in a:lines[:10] + if len(matchlist(l:line, l:exception_pattern)) > 0 + return [{ + \ 'lnum': 1, + \ 'text': 'stylelint exception thrown (type :ALEDetail for more information)', + \ 'detail': join(a:lines, "\n"), + \}] + endif + endfor + " Matches patterns line the following: " " src/main.css |