Stop writing a test file in real world usage in some cases
This commit is contained in:
parent
666cfc6ee2
commit
747d4fe80b
@ -43,7 +43,6 @@ function! ale#fix#ApplyQueuedFixes() abort
|
||||
if empty(&buftype)
|
||||
noautocmd :w!
|
||||
else
|
||||
call writefile(l:data.output, 'fix_test_file')
|
||||
set nomodified
|
||||
endif
|
||||
endif
|
||||
|
@ -82,6 +82,8 @@ After:
|
||||
call ale#fix#registry#ResetToDefaults()
|
||||
call ale#linter#Reset()
|
||||
|
||||
setlocal buftype=nofile
|
||||
|
||||
if filereadable('fix_test_file')
|
||||
call delete('fix_test_file')
|
||||
endif
|
||||
@ -245,6 +247,9 @@ Execute(ALEFix should save files on the save event):
|
||||
|
||||
let g:ale_fixers.testft = ['AddDollars']
|
||||
|
||||
" We have to set the buftype to empty so the file will be written.
|
||||
setlocal buftype=
|
||||
|
||||
call SetUpLinters()
|
||||
call ale#events#SaveEvent(bufnr(''))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user