summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-02-01 13:01:51 +0000
committerw0rp <devw0rp@gmail.com>2019-02-01 13:01:56 +0000
commit4d426bf2873c6e1cd2c71e478c756903307628d3 (patch)
treeea3d979090833dc7004e3f025415a80ab6146b41
parent067601e9db7e0c2ab6c8394c9be74769463c6da9 (diff)
downloadale-4d426bf2873c6e1cd2c71e478c756903307628d3.zip
Fix #2263 - detailed Flow errors should show the original message
-rwxr-xr-xale_linters/javascript/flow.vim3
-rw-r--r--test/handler/test_flow_handler.vader3
2 files changed, 4 insertions, 2 deletions
diff --git a/ale_linters/javascript/flow.vim b/ale_linters/javascript/flow.vim
index a4664fda..0561ab74 100755
--- a/ale_linters/javascript/flow.vim
+++ b/ale_linters/javascript/flow.vim
@@ -156,7 +156,8 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort
\}
if has_key(l:error, 'extra')
- let l:errorToAdd.detail = s:GetDetails(l:error)
+ let l:errorToAdd.detail = l:errorToAdd.text
+ \ . "\n" . s:GetDetails(l:error)
endif
call add(l:output, l:errorToAdd)
diff --git a/test/handler/test_flow_handler.vader b/test/handler/test_flow_handler.vader
index 3a575a01..055ba026 100644
--- a/test/handler/test_flow_handler.vader
+++ b/test/handler/test_flow_handler.vader
@@ -499,7 +499,8 @@ Execute(The flow handler should handle extra errors):
\ 'col': 35,
\ 'type': 'E',
\ 'text': 'props of React element `New`: This type is incompatible with object type',
- \ 'detail': 'Property `setVector` is incompatible: number This type is incompatible with function type ',
+ \ 'detail': 'props of React element `New`: This type is incompatible with object type'
+ \ . "\nProperty `setVector` is incompatible: number This type is incompatible with function type ",
\ }
\]