summaryrefslogtreecommitdiff
path: root/ale_linters/erlang
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/erlang')
-rw-r--r--ale_linters/erlang/dialyzer.vim14
1 files changed, 5 insertions, 9 deletions
diff --git a/ale_linters/erlang/dialyzer.vim b/ale_linters/erlang/dialyzer.vim
index e27f8127..41898d9c 100644
--- a/ale_linters/erlang/dialyzer.vim
+++ b/ale_linters/erlang/dialyzer.vim
@@ -4,7 +4,11 @@
let g:ale_erlang_dialyzer_executable =
\ get(g:, 'ale_erlang_dialyzer_executable', 'dialyzer')
let g:ale_erlang_dialyzer_options =
-\ get(g:, 'ale_erlang_dialyzer_options', '')
+\ get(g:, 'ale_erlang_dialyzer_options', '-Wunmatched_returns'
+\ . ' -Werror_handling'
+\ . ' -Wrace_conditions'
+\ . ' -Wunderspecs'
+\ . ' %s')
let g:ale_erlang_dialyzer_plt_file =
\ get(g:, 'ale_erlang_dialyzer_plt_file', '')
let g:ale_erlang_dialyzer_rebar3_profile =
@@ -51,14 +55,6 @@ endfunction
function! ale_linters#erlang#dialyzer#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'erlang_dialyzer_options')
- if len(l:options) == 0
- let l:options = '-Wunmatched_returns'
- \ . ' -Werror_handling'
- \ . ' -Wrace_conditions'
- \ . ' -Wunderspecs'
- \ . ' %s'
- endif
-
let l:command = ale#Escape(ale_linters#erlang#dialyzer#GetExecutable(a:buffer))
\ . ' -n'
\ . ' --plt ' . ale#Escape(ale_linters#erlang#dialyzer#GetPlt(a:buffer))