-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.
Milestone
Description
When running goimports on a file in a package that (wrongly) uses it's own name as a qualifier, goimports will rewrite the imports to include the code file's own package in the imports. Goimports shows no error and only on compilation will there be an import cycle error.
I propose that Instead of the imports being rewritten, a check be performed to see if the file is in the same package as goimports is trying to add. If this situation is detected, the command should fail and output an error message instead of rewriting.
I'll be working on patching this behavior if this proposal sounds appropriate.
cc: @alandonovan (since I think you're the one to ask)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.