-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Goimports "local" mode #209
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
Comments
goimports shouldn't complain if the file is already formatted with |
Yes, but I want it to complain if imports are not formatted with |
Hi! |
@jirfag I don't think this is working as intended yet. We're setting https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/gofmt.go#L115 , which resolves to Then we invoke https://github.com/golangci/golangci-lint/blob/master/vendor/github.com/golangci/gofmt/goimports/golangci.go#L11 , which in turn uses https://github.com/golangci/golangci-lint/blob/master/vendor/github.com/golangci/gofmt/goimports/golangci.go#L8 - So when GoImports is invoked, it doesn't have the I won't PR this as it's pretty deep into dep hell - swapping https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/gofmt.go#L9 to |
thank you |
@thepwagner you are right, the bug was introduced in commit c02a6da. |
Specifically,
-local
flag:That is very useful for projects that follow this grouping style:
The text was updated successfully, but these errors were encountered: