-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goimports regression after v1.12.4 #347
Comments
This reverts commit 015c076. Goimports regression: golangci/golangci-lint#347 And gocritic recommending fixes in tip instead of released versions.
Hi! |
I use prebuilt binaries of golangci, currently downgraded to 1.12.3. I expect that the linter does not complain when the package path ( |
I got the same issue in CI where we use the pre-built binaries GolangCI is providing. I wasn't aware I then have to manually update goimports or the other linters it depends on? |
Me neither. I'd find it quite odd. |
You don't need to use external Also you can fix the issue in all files by running something like: go get -u golang.org/x/tools/cmd/goimports
find . -name "*.go" | fgrep -v vendor/ | xargs goimports -w P.S. We are planning to add option like |
Okay, so it looks like this is an intended change, not a bug after all. I thought this was some sort of configuration change, but after reading the commit, this looks pretty logical to me. One thing though: it might make sense not to make these kind of updates in a patch version. Minor version is questionable as well, but that would be acceptable IMHO. |
The main confusion came from Goland removing those aliases. |
the idea of including this into the patch commit was that it's a bug we don't use the latest version of goimports. A few users reported that we are out of sync with goimports. |
This reverts commit 015c076. Goimports regression: golangci/golangci-lint#347 And gocritic recommending fixes in tip instead of released versions.
During the latest update of my local golangci-lint binary (from
1.12.3
to1.12.5
) I started to receive an error for packagegithub.jparrowsec.cn/hashicorp/go-getter
:File is not
goimports-ed
The package name of
go-getter
is actuallygetter
which is used in the source file.Tried with
1.12.4
as well, so I think it's safe to say this is the version where the regression has been introduced.Version of golangci-lint:
golangci-lint has version 1.12.5 built from 609de32 on 2018-12-23T09:40:14Z
Config file
Go environment
Verbose output of running
The text was updated successfully, but these errors were encountered: