-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fix removal of kubebuilder imports marker #135
Comments
I think this is an issue with comments in general. Consider the following: package main
import (
"os" // test
// comment
"fmt"
) This turns into: package main
import ( // comment
"fmt"
"os" // test
) Instead of: package main
import (
// comment
"fmt"
"os" // test
) |
Is the marker always isolated? |
In the sense of "on a separate line"? Then yes. |
To add one more data point, once your imports have been reformatted to be in the odd state shown above:
and you run
I'm using |
As I said in the README, isolated comment is hard to handle, for now I choose delete them. As kubebuilder marker is useful, I consider the hardcode way to keep it. |
@avorima I do not see this marker in https://book.kubebuilder.io/reference/markers.html. |
wait for kubernetes-sigs/kubebuilder#1487 to get more info to decide how to deal with those markers. |
#136 would fix the general issue. |
|
I think |
Yes, it looks that way |
I also see gci removing go generate lines in specific scenarios. Consider:
Becomes:
Which is very different behavior due to the lost go:generate directives. |
Is there some workaround for this problem? |
Is there any update? I'm still using old version of gci not latest version due to this issue. :( |
What version of GCI are you using?
Reproduce Steps
Run
gci print .
What did you expect to see?
What did you see instead?
This breaking change was introduced in #120. You can verify by checking the output of
v0.8.2
vsv0.8.3
.The text was updated successfully, but these errors were encountered: