Skip to content
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

Run goimport for the whole repo #29230

Merged
merged 1 commit into from
Aug 5, 2016
Merged

Conversation

luxas
Copy link
Member

@luxas luxas commented Jul 19, 2016

While removing GOMAXPROC and running goimports, I noticed quite a lot of other files also needed a goimport format. Didn't commit *.generated.go, *.deepcopy.go or files in vendor

This is more for testing if it builds.
The only strange thing here is the gopkg.in/gcfg.v1 => github.com/scalingdata/gcfg replace.
cc @jfrazelle @thockin

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-label-needed labels Jul 19, 2016
@jessfraz
Copy link
Contributor

wow nice

@thockin
Copy link
Member

thockin commented Jul 20, 2016

The gcfg change is wrong. See commit a073c80 which says Switch from obsolete "github.com/scalingdata/gcfg" to "gopkg.in/gcfg.v1". Can you figure that out?

Some of the transformations are still imperfect (usually around whitespace) but I think goimports won't fix that.

@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. retest-not-required-docs-only and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 21, 2016
@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed retest-not-required-docs-only labels Jul 28, 2016
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 2, 2016
@luxas luxas added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. release-note-label-needed labels Aug 2, 2016
@luxas luxas changed the title WIP: Run goimport for the whole repo Run goimport for the whole repo Aug 2, 2016
@luxas
Copy link
Member Author

luxas commented Aug 2, 2016

@jfrazelle This should pass now

@k8s-bot
Copy link

k8s-bot commented Aug 2, 2016

GCE e2e build/test passed for commit c88a07c.

@dims
Copy link
Member

dims commented Aug 2, 2016

Nice. Are we going to have update/verify scripts to keep imports clean?

Thanks,
Dims

@thockin
Copy link
Member

thockin commented Aug 2, 2016

we have a gofmt verifier. It could also run goimports.. hint.,..

On Tue, Aug 2, 2016 at 6:16 AM, Davanum Srinivas notifications@github.com
wrote:

Nice. Are we going to have update/verify scripts to keep imports clean?

Thanks,
Dims


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#29230 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFVgVGMOuHr2ydhqHsNIGcW6nBcTe_kTks5qb0M7gaJpZM4JQLtA
.

@jessfraz
Copy link
Contributor

jessfraz commented Aug 2, 2016

+1 for adding a script
:)

@luxas
Copy link
Member Author

luxas commented Aug 2, 2016

I also think a script would be nice, but sadly goimports doesn't understand dots in import names, so I had to hand-hack the generated output a bit.

@dims But feel free to open an issue on the goimports side (or maybe fix it), and include it to update/verify-gofmt :)

@jfrazelle Apply the label if this looks good :)

@dims
Copy link
Member

dims commented Aug 2, 2016

@luxas aha! Can you leave me some notes on what you did and i can try to dig further when i get a chance.

Thanks,
Dims

@jessfraz jessfraz added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 5, 2016
@jessfraz
Copy link
Contributor

jessfraz commented Aug 5, 2016

added LGTM

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Aug 5, 2016

GCE e2e build/test passed for commit c88a07c.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 2537f66 into kubernetes:master Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants