mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-27 22:41:10 +08:00
Run before lint cycle, rename autocmds
This commit is contained in:
@@ -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
|
||||
@@ -556,8 +558,6 @@ function! s:RunJob(options) abort
|
||||
\ 'output': [],
|
||||
\ 'next_chain_index': l:next_chain_index,
|
||||
\}
|
||||
|
||||
silent doautocmd <nomodeline> User ALEStartLint
|
||||
endif
|
||||
|
||||
if g:ale_history_enabled
|
||||
@@ -787,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
|
||||
|
||||
Reference in New Issue
Block a user