summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoracio Sanson <horacio@allm.inc>2021-01-06 10:37:48 +0900
committerHoracio Sanson <horacio@allm.inc>2021-01-22 23:17:01 +0900
commit7fe61cdf0e961ee459e19ce6cf9e65cdf1f4f30a (patch)
tree8dbefc232e4705b627e8c369b802eb115beb7722
parenta1e6df987c28dd3e0efb7422f4ad85ee3bb3bebc (diff)
downloadale-7fe61cdf0e961ee459e19ce6cf9e65cdf1f4f30a.zip
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.
-rw-r--r--autoload/ale/fixers/standardrb.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/ale/fixers/standardrb.vim b/autoload/ale/fixers/standardrb.vim
index 54330a37..acb310c6 100644
--- a/autoload/ale/fixers/standardrb.vim
+++ b/autoload/ale/fixers/standardrb.vim
@@ -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