Skip to content

Fix vimlint#3739

Merged
bhcleek merged 3 commits intofatih:masterfrom
bhcleek:fix-vimlint
Feb 16, 2026
Merged

Fix vimlint#3739
bhcleek merged 3 commits intofatih:masterfrom
bhcleek:fix-vimlint

Conversation

@bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Feb 16, 2026

scripts/lint: small refactors
  • replace echo with printf
  • ensure diagnostic messages go to stderr
  • ensure unique exit code for each lint failure
scripts/lint: avoid unexpected vimlint failure

After a GitHub runner release of the ubuntu:22.04 in February, the
vimlint call started failing without providing any output that described
the vimlint failure. 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. This was likely either a long
standing problem that was not detected in #3666 or it's a new
development that arose with the GitHub ubuntu:22.04 runner release that
was made recently.

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.
VIMLINT_VIM seems to be an undocumented feature that was intended to
client use. It's difficult to if the failure due to the maxfuncdepth
violation is a new development or not, but it seems likely.

scripts/lint: use grep -E with vimlint

Use grep -E with vimlint instead of egrep, because egrep is deprecated.

* replace echo with printf
* ensure diagnostic messages go to stderr
* ensure unique exit code for each lint failure
After a GitHub runner release of the ubuntu:22.04 in February, the
vimlint call started failing without providing any output that described
the vimlint failure. 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. This was likely either a long
standing problem that was not detected in fatih#3666 or it's a new
development that arose with the GitHub ubuntu:22.04 runner release that
was made recently.

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.
VIMLINT_VIM seems to be an undocumented feature that was intended to
client use. It's difficult to if the failure due to the maxfuncdepth
violation is a new development or not, but it seems likely.
Use grep -E with vimlint instead of egrep, because egrep is deprecated.
@bhcleek bhcleek added this to the vim-go v1.30 milestone Feb 16, 2026
@bhcleek bhcleek merged commit bdbe6dc into fatih:master Feb 16, 2026
8 checks passed
@bhcleek bhcleek deleted the fix-vimlint branch February 16, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant