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' \ get(g:, 'ale_erlang_dialyzer_options', '-Wunmatched_returns'
\ . ' -Werror_handling' \ . ' -Werror_handling'
\ . ' -Wrace_conditions' \ . ' -Wrace_conditions'
\ . ' -Wunderspecs' \ . ' -Wunderspecs')
\ . ' %s')
let g:ale_erlang_dialyzer_plt_file = let g:ale_erlang_dialyzer_plt_file =
\ get(g:, 'ale_erlang_dialyzer_plt_file', '') \ get(g:, 'ale_erlang_dialyzer_plt_file', '')
let g:ale_erlang_dialyzer_rebar3_profile = let g:ale_erlang_dialyzer_rebar3_profile =
@ -59,6 +58,7 @@ function! ale_linters#erlang#dialyzer#GetCommand(buffer) abort
\ . ' -n' \ . ' -n'
\ . ' --plt ' . ale#Escape(ale_linters#erlang#dialyzer#GetPlt(a:buffer)) \ . ' --plt ' . ale#Escape(ale_linters#erlang#dialyzer#GetPlt(a:buffer))
\ . ' ' . l:options \ . ' ' . l:options
\ . ' %s'
return l:command return l:command
endfunction 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* g:ale_erlang_dialyzer_options *g:ale_erlang_dialyzer_options*
*b:ale_erlang_dialyzer_options* *b:ale_erlang_dialyzer_options*
Type: |String| 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 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* g:ale_erlang_dialyzer_plt_file *g:ale_erlang_dialyzer_plt_file*
*b: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') \ ale#Escape('dialyzer')
\ . ' -n --plt ' . ale#Escape(expand('$HOME/.dialyzer_plt')) \ . ' -n --plt ' . ale#Escape(expand('$HOME/.dialyzer_plt'))
\ . ' -r ' . expand('$HOME') \ . ' -r ' . expand('$HOME')
\ . ' %s'
Execute(The command should accept configured PLT file.): Execute(The command should accept configured PLT file.):
let b:ale_erlang_dialyzer_plt_file = 'custom-plt' let b:ale_erlang_dialyzer_plt_file = 'custom-plt'