-
Notifications
You must be signed in to change notification settings - Fork 67
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
errors when using import alias, zap package since version 0.3.0 #60
Comments
Could you try latest version? |
I'm using the latest version of golangci-lint, which includes gci 0.3.2. golangci/golangci-lint#2640 I'm not sure when they will update to 0.3.3, but it doesn't look like that version has fixes for these issues. |
@brandon-lango Could you please specify the exact command that you ran gci with and upload the affected files so that I can try to reproduce the issue. Only the import section is relevant you can remove everything else. |
Here are a few examples. It seems to fail everywhere there is an import alias or we use the zap package. I'm running gci as a part to golangci-lint, not as a standalone command. We are using all the default settings for gci. Expected 'i', Found 'o' at pkg/mt/infra/providers/onedrive/download.go[line 9,col 4] (gci)
Expected '\t', Found '\n' at pkg/mt/infra/providers/externalstorage/goroutines.go[line 5,col 1] (gci)
Expected '"', Found 'l' at pkg/auth/infra/providers/cognito/register.go[line 11,col 2] (gci)
|
Please add prefix to test. |
I've got this issue as well with golangci-lint v1.46.2
|
We are using gci as part of golangci-lint. Ever since version 0.3.0, we have been getting errors where previous versions have worked.
This error seems like it's expecting everything to import from github.com, however we use zap which comes from go.uber.org.
Expected 'i', Found 'o'
"go.uber.org/zap"
We also get this, which seems to be related to using aliases
Expected '"', Found 'l'
log "github.com/sirupsen/logrus"
This version also seems to not like blank lines between our third party libraries and internal imports.
Expected '\t', Found '\n'
The text was updated successfully, but these errors were encountered: