You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
flag.StringVar(&options.LocalPrefix, "local", "", "put imports beginning with this string after 3rd-party packages; comma-separated list")
The issue now, is that if we run goimports with our custom yet common configuration, the mock files are changed.
Would it be possible to forward this flag from outside to the goimports executed after mock generation? It is not possible to exclude files from being changed by goimports, so only a fix here would do the trick.
Cheers,
Mark
PS: Any plans when to cut the 1.5 release?
The text was updated successfully, but these errors were encountered:
I think I understand the general issue here; which is how do users pass options to the goimports functionality that gomock executes.... which seems like a massive can of worms 😆
I think this one will need some deliberation and probably successful examples of solving this problem in other tools.
At this time we will not allow passing through extra flags for goimports. mockgen already has many flags of its own and we would like to avoid adding more where possible. It is reasonable it you have a different standard for imports that you can adjust the style post generation.
Dear gomock developers,
we started using a master version of gomock in order to benefit from #458 and stop the "fix goimports" comments on all of our PRs.
The generated mocks have their imports divided in two blocks. However, we want to run goimports in our repository with the -local flag, see https://github.com/golang/tools/blob/master/cmd/goimports/goimports.go#L55, which leads to three blocks imports.
The issue now, is that if we run goimports with our custom yet common configuration, the mock files are changed.
Would it be possible to forward this flag from outside to the goimports executed after mock generation? It is not possible to exclude files from being changed by goimports, so only a fix here would do the trick.
Cheers,
Mark
PS: Any plans when to cut the 1.5 release?
The text was updated successfully, but these errors were encountered: