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

Use goimports for formatting #2655

Merged
merged 3 commits into from Aug 3, 2020
Merged

Conversation

timebertt
Copy link
Member

How to categorize this PR?

/area dev-productivity
/kind task
/priority normal

What this PR does / why we need it:
Following up on discussions like #2336 (comment), this PR switches formatting to goimports, in order to get rid of please sort the imports comments on PRs.

Unfortunately, goimports also does not correctly group all third-party/local imports into one import group according to https://github.com/golang/go/wiki/CodeReviewComments#imports.
But as discussed in the linked thread, it probably makes sense to stick to official tools like goimports and agree on the formatting enforced by it, so we can just omit PR comments like please sort the imports if goimports accepts the proposed sorting.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

goimports is now used to format go source files.

@timebertt timebertt requested review from a team as code owners August 3, 2020 12:14
@gardener-robot gardener-robot added area/dev-productivity Developer productivity related (how to improve development) kind/task General task priority/normal labels Aug 3, 2020
go.mod Show resolved Hide resolved
Copy link
Contributor

@timuthy timuthy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! /lgtm

Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't like goimports, but I agree it's necessary to improve our dev productivity... thanks for pushing this forward!
/lgtm

@rfranzke rfranzke merged commit 0255b12 into gardener:master Aug 3, 2020
@timebertt timebertt deleted the hack/goimports branch August 3, 2020 14:06
@timebertt
Copy link
Member Author

I still don't like goimports, but I agree it's necessary to improve our dev productivity...

I don't like it either. Totally agreed 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev-productivity Developer productivity related (how to improve development) kind/task General task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants