Clean up the mix format command and tests
This commit is contained in:
parent
92612a9eab
commit
440502dc93
@ -12,7 +12,9 @@ function! ale#fixers#mix_format#GetCommand(buffer) abort
|
||||
let l:executable = ale#Escape(ale#fixers#mix_format#GetExecutable(a:buffer))
|
||||
let l:options = ale#Var(a:buffer, 'elixir_mix_format_options')
|
||||
|
||||
return l:executable . ' format ' . l:options . ' %t'
|
||||
return l:executable . ' format'
|
||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||
\ . ' %t'
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#mix_format#Fix(buffer) abort
|
||||
|
@ -1,11 +1,15 @@
|
||||
Before:
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
Save g:ale_elixir_mix_executable
|
||||
Save g:ale_elixir_mix_format_options
|
||||
|
||||
let g:ale_elixir_mix_executable = 'xxxinvalid'
|
||||
let g:ale_elixir_mix_format_options = ''
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The mix_format callback should return the correct default values):
|
||||
|
Loading…
Reference in New Issue
Block a user