Show Elm.Kernel as location when report.path
is null
in a general problem
This commit is contained in:
parent
c3f61c391b
commit
115952fae3
@ -22,6 +22,10 @@ function! ale_linters#elm#make#Handle(buffer, lines) abort
|
||||
" General problem
|
||||
let l:details = ale_linters#elm#make#ParseMessage(l:report.message)
|
||||
|
||||
if empty(l:report.path)
|
||||
let l:report.path = 'Elm.Kernel'
|
||||
endif
|
||||
|
||||
if ale_linters#elm#make#FileIsBuffer(l:report.path)
|
||||
call add(l:output, {
|
||||
\ 'lnum': 1,
|
||||
@ -36,7 +40,6 @@ function! ale_linters#elm#make#Handle(buffer, lines) abort
|
||||
\ 'detail': l:report.path ." ----------\n\n". l:details,
|
||||
\})
|
||||
endif
|
||||
|
||||
else
|
||||
" Compilation errors
|
||||
for l:error in l:report.errors
|
||||
|
@ -95,6 +95,12 @@ Execute(The elm make handler should handle errors in imported modules):
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'type': 'E',
|
||||
\ 'text': "Elm.Kernel - error details\n\nstyled details",
|
||||
\ 'detail': "Elm.Kernel ----------\n\nerror details\n\nstyled details"
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'type': 'E',
|
||||
\ 'text': "src/Module.elm:404 - error details\n\nstyled details",
|
||||
\ 'detail': "src/Module.elm:404 ----------\n\nerror details\n\nstyled details"
|
||||
\ },
|
||||
@ -107,6 +113,12 @@ Execute(The elm make handler should handle errors in imported modules):
|
||||
\ "message": ["error details\n\n", { "string": "styled details" }]
|
||||
\ }',
|
||||
\ '{
|
||||
\ "type": "error",
|
||||
\ "path": null,
|
||||
\ "title": "UNKNOWN IMPORT",
|
||||
\ "message": ["error details\n\n", { "string": "styled details" }]
|
||||
\ }',
|
||||
\ '{
|
||||
\ "type": "compile-errors",
|
||||
\ "errors": [
|
||||
\ {
|
||||
|
Loading…
Reference in New Issue
Block a user