refactor(erlang/dialyzer): remove file placeholder from options

Signed-off-by: Pierre-Nicolas Clauss <pinicarus@protonmail.com>
This commit is contained in:
Pierre-Nicolas Clauss 2021-01-17 14:10:11 +01:00
parent 0ac7595fe9
commit 105bc55695
No known key found for this signature in database
GPG Key ID: BED1B8A689160C89
3 changed files with 5 additions and 4 deletions

View File

@ -7,8 +7,7 @@ let g:ale_erlang_dialyzer_options =
\ get(g:, 'ale_erlang_dialyzer_options', '-Wunmatched_returns'
\ . ' -Werror_handling'
\ . ' -Wrace_conditions'
\ . ' -Wunderspecs'
\ . ' %s')
\ . ' -Wunderspecs')
let g:ale_erlang_dialyzer_plt_file =
\ get(g:, 'ale_erlang_dialyzer_plt_file', '')
let g:ale_erlang_dialyzer_rebar3_profile =
@ -59,6 +58,7 @@ function! ale_linters#erlang#dialyzer#GetCommand(buffer) abort
\ . ' -n'
\ . ' --plt ' . ale#Escape(ale_linters#erlang#dialyzer#GetPlt(a:buffer))
\ . ' ' . l:options
\ . ' %s'
return l:command
endfunction

View File

@ -16,10 +16,10 @@ g:ale_erlang_dialyzer_executable *g:ale_erlang_dialyzer_executable*
g:ale_erlang_dialyzer_options *g:ale_erlang_dialyzer_options*
*b:ale_erlang_dialyzer_options*
Type: |String|
Default: `'-Wunmatched_returns -Werror_handling -Wrace_conditions -Wunderspec %s'`
Default: `'-Wunmatched_returns -Werror_handling -Wrace_conditions -Wunderspec'`
This variable can be changed to specify the options to pass to the dialyzer
executable. The `%s` marker can be used to denote the current file.
executable.
g:ale_erlang_dialyzer_plt_file *g:ale_erlang_dialyzer_plt_file*
*b:ale_erlang_dialyzer_plt_file*

View File

@ -31,6 +31,7 @@ Execute(The command should accept configured options.):
\ ale#Escape('dialyzer')
\ . ' -n --plt ' . ale#Escape(expand('$HOME/.dialyzer_plt'))
\ . ' -r ' . expand('$HOME')
\ . ' %s'
Execute(The command should accept configured PLT file.):
let b:ale_erlang_dialyzer_plt_file = 'custom-plt'