Closed matthewhughes934 closed 1 month ago
Yes, I agree that it looks like we could shift to checking the exit code to be sure that it's 2. I also think it's worth submitting a PR to vim-vimlint to use grep -E
instead of egrep
in an attempt to avoid a more complete future breakage.
I also think it's worth submitting a PR to vim-vimlint to use
grep -E
instead ofegrep
in an attempt to avoid a more complete future breakage.
:+1: https://github.com/syngan/vim-vimlint/pull/124 though I'm not too optimistic about it being reviewed/merged any time soon :sweat_smile:
I'm having a hard time duplicating this.
vim-go@bc579251da29:~$ make lint
==> Running linting tools
Running vint ... PASSED
Running vim-vimlint ... PASSED
Running vimhelplint ... PASSED
vim-go@bc579251da29:~$ grep --version
grep (GNU grep) 3.8
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others; see
<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
vim-go@bc579251da29:~$ egrep --version
grep (GNU grep) 3.8
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others; see
<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
vim-go@bc579251da29:~$
I'm having a hard time duplicating this.
Is your version of grep
packaged by Debian/are you running on a Debian based distro? It looks like they have a patch to suppress that warning
Equivalently: does egrep --version
emit a warning for you? For reference, I'm running on Arch:
$ docker run archlinux:latest egrep --version >/dev/null
egrep: warning: egrep is obsolescent; using grep -E
$ docker run debian:latest egrep --version >/dev/null
Ah, yup, that would do it. Thank you 🙇 .
Output of
make lint
This failure is because the
Running vim-vimlint
step is marked as failed when any output is captured https://github.com/fatih/vim-go/blob/ca6c532753e70e4fb093e755773cc6f250a3b4b3/scripts/lint#L58But
vim-vimlint
usesegrep
when run https://github.com/syngan/vim-vimlint/blob/cec40c28f119a5f4b92ceb0b6aae525122a81244/bin/vimlint.sh#L106 since GNUgrep
3.8egrep
is deprecated and emits a warning https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html which is then captured, resulting in failure.Since https://github.com/syngan/vim-vimlint has not been updated in 6 years I don't imagine we can patch there. Maybe the lint script could check the exit code of
vimlin-lint
instead?