Merge pull request #1203 from Carpetsmoker/autocmd-start

Add ALEStartLint autocmd
This commit is contained in:
w0rp
2017-12-17 12:06:57 +00:00
committed by GitHub
4 changed files with 40 additions and 19 deletions

View File

@@ -321,6 +321,8 @@ function! ale#engine#SetResults(buffer, loclist) abort
call ale#engine#RemoveManagedFiles(a:buffer)
" Call user autocommands. This allows users to hook into ALE's lint cycle.
silent doautocmd <nomodeline> User ALELintPost
" Old DEPRECATED name; call it for backwards compatibility.
silent doautocmd <nomodeline> User ALELint
endif
endfunction
@@ -785,6 +787,8 @@ function! ale#engine#RunLinters(buffer, linters, should_lint_file) abort
" We can only clear the results if we aren't checking the buffer.
let l:can_clear_results = !ale#engine#IsCheckingBuffer(a:buffer)
silent doautocmd <nomodeline> User ALELintPre
for l:linter in a:linters
" Only run lint_file linters if we should.
if !l:linter.lint_file || a:should_lint_file