Skip to content

Commit 85b2391

Browse files
committed
scripts/lint: avoid unexpected vimlint failure
After a GitHub runner release of the ubuntu:22.04 in February, the vimlint call started failing. This seems to be for two reasons that work in concert. First, vimlint was exiting non-zero and causing script/lint to exit without reporting vimlint's output, because scripts/lint had errexit set, causing it exit immediately. Second, the call depth being analysed by vimlint exceeded maxfuncdepth, so set it to a higher value by leveraging VIMLINT_VIM to set maxfuncdepth to 200 to avoid vimlint exiting non-zero due to that.
1 parent 530702c commit 85b2391

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ fi
4848
### Run vim-vimlint
4949
###################
5050
printf "Running vim-vimlint ... \n" >&2
51+
set +e
5152
lint=$(sh "$vimdir/share/vim/vimgo/pack/vim-go/start/vim-vimlint/bin/vimlint.sh" \
5253
-p "$vimdir/share/vim/vimgo/pack/vim-go/start/vim-vimlparser" \
5354
-l "$vimdir/share/vim/vimgo/pack/vim-go/start/vim-vimlint" \
@@ -57,6 +58,7 @@ lint=$(sh "$vimdir/share/vim/vimgo/pack/vim-go/start/vim-vimlint/bin/vimlint.sh"
5758
"$vimgodir" \
5859
2>&1)
5960
result="$?"
61+
set -e
6062
if [ "$result" -eq "2" ]; then
6163
printf "FAILED\n" >&2
6264
printf "$lint" >&2

0 commit comments

Comments
 (0)