You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revive exits non-zero and outputs an error, "linting - retrieving failures channel: command go list: exit status 1," when run against a null module or with module support turned off.
To Reproduce
Update revive to v1.3.9
set GO111MODULE=off
Execute revive against a package that is placed properly in GOPATH
Note that the problem will also manifest when revive is executed against a package that is not in a module at all and is also not in GOPATH.
Expected behavior
Appropriate linting errors should be displayed.
Additional context
This works fine in v1.3.7 and lower; it's a new problem in v1.3.9. If you want some files to use, vim-go's test-fixtures may be useful. The files in the test-fixture for its lint tests are relevant. Here's output showing v1.3.7 vs v1.3.9 behavior:
With v1.3.7:
❯❯❯ GO111MODULE=off GOPATH=$PWD/autoload/go/test-fixtures/lint revive .
lint.go:1:1: should have a package comment
quux.go:5:1: exported function AlsoMissingDoc should have comment or be unexported
lint.go:5:1: exported function MissingDoc should have comment or be unexported
With v1.3.9:
❯❯❯ GO111MODULE=off GOPATH=$PWD/autoload/go/test-fixtures/lint revive .
linting - retrieving failures channel: command go list: exit status 1
The text was updated successfully, but these errors were encountered:
@chavacava#1025 only fixes the case where GO111MODULE is off and revive is being run against a package that is within in a module. The problem I reported still exists when the package being checked does not have a go.mod file.
Description
Revive exits non-zero and outputs an error, "linting - retrieving failures channel: command go list: exit status 1," when run against a null module or with module support turned off.
To Reproduce
Note that the problem will also manifest when revive is executed against a package that is not in a module at all and is also not in GOPATH.
Expected behavior
Appropriate linting errors should be displayed.
Additional context
This works fine in v1.3.7 and lower; it's a new problem in v1.3.9. If you want some files to use, vim-go's test-fixtures may be useful. The files in the test-fixture for its lint tests are relevant. Here's output showing v1.3.7 vs v1.3.9 behavior:
With v1.3.7:
With v1.3.9:
The text was updated successfully, but these errors were encountered: