mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 05:04:28 +08:00
Fix 3498 - Change standardrb fixer to read from stdin.
Seems standardrb fails to properly use the --config option when using temporary files but works fine when reading from stdin. This commit changes the fixer so it uses stdin instead of temporary files.
This commit is contained in:
@@ -12,12 +12,12 @@ function! ale#fixers#standardrb#GetCommand(buffer) abort
|
||||
return ale#ruby#EscapeExecutable(l:executable, 'standardrb')
|
||||
\ . (!empty(l:config) ? ' --config ' . ale#Escape(l:config) : '')
|
||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||
\ . ' --fix --force-exclusion %t'
|
||||
\ . ' --fix --force-exclusion --stdin %s'
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#standardrb#Fix(buffer) abort
|
||||
return {
|
||||
\ 'command': ale#fixers#standardrb#GetCommand(a:buffer),
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess'
|
||||
\}
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user