summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-06-27 22:24:48 +0100
committerGitHub <noreply@github.com>2017-06-27 22:24:48 +0100
commitf984c5fb83024cb78bff8900ced30b733660d636 (patch)
treefedda76fcf115f9ede54d44451f6bf5d082d11f5
parent0302d2a328aecccd6fe6c135664e3f4b3f96ef5f (diff)
parent72161b82ef29a7f6a1eb575533f61abd6ad13b53 (diff)
downloadale-f984c5fb83024cb78bff8900ced30b733660d636.zip
Merge pull request #699 from jwoudenberg/master
Elm linter shows full error ranges
-rw-r--r--ale_linters/elm/make.vim2
-rw-r--r--test/handler/test_elmmake_handler.vader10
2 files changed, 12 insertions, 0 deletions
diff --git a/ale_linters/elm/make.vim b/ale_linters/elm/make.vim
index da81287c..0a570ff6 100644
--- a/ale_linters/elm/make.vim
+++ b/ale_linters/elm/make.vim
@@ -23,6 +23,8 @@ function! ale_linters#elm#make#Handle(buffer, lines) abort
call add(l:output, {
\ 'lnum': l:error.region.start.line,
\ 'col': l:error.region.start.column,
+ \ 'end_lnum': l:error.region.end.line,
+ \ 'end_col': l:error.region.end.column,
\ 'type': (l:error.type ==? 'error') ? 'E' : 'W',
\ 'text': l:error.overview,
\ 'detail': l:error.overview . "\n\n" . l:error.details
diff --git a/test/handler/test_elmmake_handler.vader b/test/handler/test_elmmake_handler.vader
index 3f10a60d..cbd7ac9f 100644
--- a/test/handler/test_elmmake_handler.vader
+++ b/test/handler/test_elmmake_handler.vader
@@ -7,6 +7,8 @@ Execute(The elm-make handler should parse lines correctly):
\ {
\ 'lnum': 33,
\ 'col': 1,
+ \ 'end_lnum': 33,
+ \ 'end_col': 19,
\ 'type': 'W',
\ 'text': 'warning overview',
\ 'detail': "warning overview\n\nwarning details",
@@ -14,6 +16,8 @@ Execute(The elm-make handler should parse lines correctly):
\ {
\ 'lnum': 404,
\ 'col': 1,
+ \ 'end_lnum': 408,
+ \ 'end_col': 18,
\ 'type': 'E',
\ 'text': 'error overview 1',
\ 'detail': "error overview 1\n\nerror details 1",
@@ -21,6 +25,8 @@ Execute(The elm-make handler should parse lines correctly):
\ {
\ 'lnum': 406,
\ 'col': 5,
+ \ 'end_lnum': 407,
+ \ 'end_col': 17,
\ 'type': 'E',
\ 'text': 'error overview 2',
\ 'detail': "error overview 2\n\nerror details 2",
@@ -28,6 +34,8 @@ Execute(The elm-make handler should parse lines correctly):
\ {
\ 'lnum': 406,
\ 'col': 5,
+ \ 'end_lnum': 406,
+ \ 'end_col': 93,
\ 'type': 'E',
\ 'text': 'error overview 3',
\ 'detail': "error overview 3\n\nerror details 3",
@@ -44,6 +52,8 @@ Execute(The elm-make handler should put an error on the first line if a line can
\ {
\ 'lnum': 33,
\ 'col': 1,
+ \ 'end_lnum': 33,
+ \ 'end_col': 19,
\ 'type': 'W',
\ 'text': 'warning overview',
\ 'detail': "warning overview\n\nwarning details",