Handle linter callback functions being unknown or deleted
This commit is contained in:
parent
033a6c1178
commit
ab2b181012
@ -221,7 +221,12 @@ function! s:HandleExit(job_id, exit_code) abort
|
|||||||
call ale#history#RememberOutput(l:buffer, a:job_id, l:output[:])
|
call ale#history#RememberOutput(l:buffer, a:job_id, l:output[:])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let l:loclist = ale#util#GetFunction(l:linter.callback)(l:buffer, l:output)
|
try
|
||||||
|
let l:loclist = ale#util#GetFunction(l:linter.callback)(l:buffer, l:output)
|
||||||
|
" Handle the function being unknown, or being deleted.
|
||||||
|
catch /E700/
|
||||||
|
let l:loclist = []
|
||||||
|
endtry
|
||||||
|
|
||||||
call ale#engine#HandleLoclist(l:linter.name, l:buffer, l:loclist)
|
call ale#engine#HandleLoclist(l:linter.name, l:buffer, l:loclist)
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -2206,6 +2206,10 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
|
|||||||
defined, as LSP linters handle diagnostics
|
defined, as LSP linters handle diagnostics
|
||||||
automatically. See |ale-lsp-linters|.
|
automatically. See |ale-lsp-linters|.
|
||||||
|
|
||||||
|
If the function named does not exist, including if
|
||||||
|
the function is later deleted, ALE will behave as if
|
||||||
|
the callback returned an empty list.
|
||||||
|
|
||||||
The keys for each item in the List will be handled in
|
The keys for each item in the List will be handled in
|
||||||
the following manner:
|
the following manner:
|
||||||
*ale-loclist-format*
|
*ale-loclist-format*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user