summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2021-01-28 04:52:24 +0900
committerGitHub <noreply@github.com>2021-01-27 19:52:24 +0000
commitbafe1c0fd62ee8173fdbc04a04caf59e3adeabc9 (patch)
tree0c859c3effce39b7a9233cd7e7933f96351d5105 /autoload
parentc9f4005820092c7824a35f1d62ae0dc93e474815 (diff)
downloadale-bafe1c0fd62ee8173fdbc04a04caf59e3adeabc9.zip
3560 add vim 8.2 and nvim 0.4 to ci tests (#3561)
* Add vim82 and neovim04 to CI tests. * Fix test_sign_column_hightlighting test. In vim82 with verbose=1 the output of highlight command changes breaking the ale#sign#SetUpDefaultColumnWithoutErrorsHighlight(). This commit forces verbose=0 when the method starts and restores the previous value before exiting. * No return values in vim82 returns a numeric value instead of a empty string. * Fix test_reek_handler test The FuzzyJSONDecode() method catches E474 when it fails to parse the input as JSON but Vim8.2 throws E491 instead. This commit modifies the function to catch both E474 or E491. * Fix perl6 handler test. Perl6 handler catches json parse errors using the E474 error but in Vim82 it changed to E491. This commit modifies the handler so both errors are considered. * Fix list opening tests. In Vim 8.2 the call `range(1, bufnr('$'))` always returns quickfix buffers no matter if they are closed or not. Using `ls` does not show them but the above range will always include them. This new behavior breaks the ale#list#IsQuickfixOpen() method that in turn breaks many other things. This commit fixes this by using the getqflist() and getloclist() methods instead. * Fix test updates loclist test. For some reason in Vim 8.2 the sign offset seems to not reset between tests causing the sign_id to not match in the Assert. When the test is run individually it passes but when run as part of the whole suite the sign_id is off by one. Forcing the offset in the test setup seems to fix the issue. * Fix omnifunc completion test. For unknown reasons the SetCompletionResponse tests fail in Neovim 0.2 and 0.4. Unfortunatelly the only solution I found is to disable them for neovim. * Fix linter warnings * Fix smoker test. Add vim 8.2 to the list of versions that need some retires due to randomly failing tests. * Add docker image build job. Trying some clever trick to build the docker image if not available locally or in Docker hub. It uses the Dockerfile md5 checksum as tag so only when changes on that file occur will the image be downloaded or build. * Add labels to Docker image * Remove tests for middle versions 8.1 and 0.3.5 * Use same vader commit as appveyor * Implement image push to Docker Hub Co-authored-by: Horacio Sanson <horacio@allm.inc>
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/hdl_checker.vim2
-rw-r--r--autoload/ale/list.vim16
-rw-r--r--autoload/ale/sign.vim3
-rw-r--r--autoload/ale/util.vim2
4 files changed, 17 insertions, 6 deletions
diff --git a/autoload/ale/handlers/hdl_checker.vim b/autoload/ale/handlers/hdl_checker.vim
index 36dbd259..e11c5377 100644
--- a/autoload/ale/handlers/hdl_checker.vim
+++ b/autoload/ale/handlers/hdl_checker.vim
@@ -32,6 +32,8 @@ function! ale#handlers#hdl_checker#GetProjectRoot(buffer) abort
if ale#handlers#hdl_checker#IsDotGit(l:project_root)
return fnamemodify(l:project_root, ':h:h')
endif
+
+ return ''
endfunction
function! ale#handlers#hdl_checker#GetExecutable(buffer) abort
diff --git a/autoload/ale/list.vim b/autoload/ale/list.vim
index 4bfe2a7b..c2ae5cc5 100644
--- a/autoload/ale/list.vim
+++ b/autoload/ale/list.vim
@@ -20,11 +20,17 @@ endif
" Return 1 if there is a buffer with buftype == 'quickfix' in bufffer list
function! ale#list#IsQuickfixOpen() abort
- for l:buf in range(1, bufnr('$'))
- if getbufvar(l:buf, '&buftype') is# 'quickfix'
- return 1
- endif
- endfor
+ let l:res = getqflist({ 'winid' : winnr() })
+
+ if has_key(l:res, 'winid') && l:res.winid > 0
+ return 1
+ endif
+
+ let l:res = getloclist(0, { 'winid' : winnr() })
+
+ if has_key(l:res, 'winid') && l:res.winid > 0
+ return 1
+ endif
return 0
endfunction
diff --git a/autoload/ale/sign.vim b/autoload/ale/sign.vim
index 8109c60e..2864f39b 100644
--- a/autoload/ale/sign.vim
+++ b/autoload/ale/sign.vim
@@ -50,9 +50,12 @@ if !hlexists('ALESignColumnWithErrors')
endif
function! ale#sign#SetUpDefaultColumnWithoutErrorsHighlight() abort
+ let l:verbose = &verbose
+ set verbose=0
redir => l:output
0verbose silent highlight SignColumn
redir end
+ let &verbose = l:verbose
let l:highlight_syntax = join(split(l:output)[2:])
let l:match = matchlist(l:highlight_syntax, '\vlinks to (.+)$')
diff --git a/autoload/ale/util.vim b/autoload/ale/util.vim
index 1f396377..5c41ab83 100644
--- a/autoload/ale/util.vim
+++ b/autoload/ale/util.vim
@@ -409,7 +409,7 @@ function! ale#util#FuzzyJSONDecode(data, default) abort
endif
return l:result
- catch /E474/
+ catch /E474\|E491/
return a:default
endtry
endfunction