summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-03 16:13:01 +0100
committerw0rp <devw0rp@gmail.com>2017-07-03 16:13:10 +0100
commitfd6f05c9ea7e3ff0ce7a86354b170e954e2e05b6 (patch)
tree6e5783978ff316ed9d11b76d9de80c9c1f367f38 /autoload
parent5a3cfbbdf50bc3e82e8ceca486a6bbda201f99d9 (diff)
downloadale-fd6f05c9ea7e3ff0ce7a86354b170e954e2e05b6.zip
Report exceptions thrown for stylelint
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/css.vim12
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