Run a lint cycle after fixing problems

This commit is contained in:
w0rp 2017-05-19 15:24:21 +01:00
parent 18467a55b5
commit 74691269ce
2 changed files with 9 additions and 1 deletions

View File

@ -41,6 +41,12 @@ function! ale#fix#ApplyQueuedFixes() abort
silent execute l:start_line . ',' . l:end_line . 'd'
call winrestview(l:save)
endif
" If ALE linting is enabled, check for problems with the file again after
" fixing problems.
if g:ale_enabled
call ale#Queue(g:ale_lint_delay)
endif
endfunction
function! s:ApplyFixes(buffer, output) abort

View File

@ -1,5 +1,6 @@
Before:
Save g:ale_fixers, &shell
Save g:ale_fixers, &shell, g:ale_enabled
let g:ale_enabled = 0
let g:ale_run_synchronously = 1
let g:ale_fixers = {
\ 'testft': [],
@ -31,6 +32,7 @@ Before:
function RemoveLastLine(buffer, lines) abort
return ['a', 'b']
endfunction
After:
Restore
unlet! g:ale_run_synchronously