mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 21:44:47 +08:00
Write erlc output files to the temporary directory
In particular, if we're working with a leex (.xrl) or yecc (.yrl) source file, erlc would otherwise generate the corresponding .erl file in the current directory (often the project root), which is generally not what we want. Unconditionally writing erlc output to a temporary directory also matches Flycheck's behavior.
This commit is contained in:
@@ -3,7 +3,8 @@
|
|||||||
let g:ale_erlang_erlc_options = get(g:, 'ale_erlang_erlc_options', '')
|
let g:ale_erlang_erlc_options = get(g:, 'ale_erlang_erlc_options', '')
|
||||||
|
|
||||||
function! ale_linters#erlang#erlc#GetCommand(buffer) abort
|
function! ale_linters#erlang#erlc#GetCommand(buffer) abort
|
||||||
return 'erlc ' . g:ale_erlang_erlc_options . ' %t'
|
let l:temp_dir = has('win32') ? $TMP : $TMPDIR
|
||||||
|
return 'erlc -o ' . l:temp_dir . ' ' . g:ale_erlang_erlc_options . ' %t'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#erlang#erlc#Handle(buffer, lines) abort
|
function! ale_linters#erlang#erlc#Handle(buffer, lines) abort
|
||||||
|
|||||||
Reference in New Issue
Block a user