Close #2522 - Check pylint on the fly

Newer versions of pylint will now check your code as you type. Older
versions will still only check the file on disk.

Co-authored-by: Oliver Wiegers <oliver.wiegers@gmail.com>
This commit is contained in:
w0rp
2020-09-09 21:45:15 +01:00
co-authored by Oliver Wiegers
parent 78fa93bd55
commit 4ddf742643
5 changed files with 119 additions and 54 deletions
+16
View File
@@ -132,3 +132,19 @@ Execute(Linters where lint_file eventually evaluates to 1 shouldn't be run if we
call ale#test#FlushJobs()
AssertEqual [], ale#test#GetLoclistWithoutModule()
Execute(Keeping computed lint_file jobs running should work):
AssertEqual 'testlinter2', ale#linter#Get('foobar')[1].name
call ale#engine#InitBufferInfo(bufnr(''))
call ale#engine#MarkLinterActive(
\ g:ale_buffer_info[bufnr('')],
\ ale#linter#Get('foobar')[1]
\)
call ale#engine#RunLinters(bufnr(''), ale#linter#Get('foobar'), 0)
Assert !empty(g:ale_buffer_info[bufnr('')].active_linter_list),
\ 'The active linter list was empty'
Assert ale#engine#IsCheckingBuffer(bufnr('')),
\ 'The IsCheckingBuffer function returned 0'