-
-
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
duplicate package and import lines when unused linting error and --fix #967
Comments
+1 |
+1 I was able to reproduce this issue. |
Can we get any update on this? I've had to disable |
In this run the unused linter was disabled due to golangci/golangci-lint#967.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still broken as of 36aa124 |
The bug is still presenting in 1.54.2 |
Tracking duplicate issue #3230. See linked tickets there fore more context. |
Thank you for creating the issue!
Please include the following information:
Version of golangci-lint 1.23.6
Config file
Go environment
Verbose output of running
When running
golangci-lint run --fix
each of the files that have the linting errorunused
ends up with a duplicate of the package line and import lines added to the top of the file. If a single file has multipleunused
errors then it looks like the package and import lines are duplicated as many times as anunused
error is found.This is probably an error with the underlying linter that golangci-lint calls. Any advice for running the
unused
linter on the project by itself? I would like to report this issue on the correct project if it doesn't belong here.The text was updated successfully, but these errors were encountered: