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)
|
if empty(&buftype)
|
||||||
noautocmd :w!
|
noautocmd :w!
|
||||||
else
|
else
|
||||||
call writefile(l:data.output, 'fix_test_file')
|
|
||||||
set nomodified
|
set nomodified
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -82,6 +82,8 @@ After:
|
|||||||
call ale#fix#registry#ResetToDefaults()
|
call ale#fix#registry#ResetToDefaults()
|
||||||
call ale#linter#Reset()
|
call ale#linter#Reset()
|
||||||
|
|
||||||
|
setlocal buftype=nofile
|
||||||
|
|
||||||
if filereadable('fix_test_file')
|
if filereadable('fix_test_file')
|
||||||
call delete('fix_test_file')
|
call delete('fix_test_file')
|
||||||
endif
|
endif
|
||||||
@ -245,6 +247,9 @@ Execute(ALEFix should save files on the save event):
|
|||||||
|
|
||||||
let g:ale_fixers.testft = ['AddDollars']
|
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 SetUpLinters()
|
||||||
call ale#events#SaveEvent(bufnr(''))
|
call ale#events#SaveEvent(bufnr(''))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user