-
Notifications
You must be signed in to change notification settings - Fork 263
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
feat(build.sh): Enable goimports + cleanup imports in source files #186
Conversation
hack/build.sh
Outdated
@@ -61,6 +61,9 @@ run() { | |||
# Format source code | |||
go_fmt | |||
|
|||
# Cleanup imports | |||
go_imports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor... same as comment to go_fmt
. I'd move anything that changes the code before compile and test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change the order in another PR, just let those get merged first.
hack/build.sh
Outdated
@@ -61,6 +61,10 @@ run() { | |||
# Format source code | |||
go_fmt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we remove the go_fmt
now? since, in addition to fixing imports, goimports also formats code in the same style as gofmt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, ok. I thought they do different things. Let me check.
/approve |
Much like 'go fmt' for cleaning up go source, 'goimports' can help in properly formatting and grouping imports. See https://goinbigdata.com/goimports-vs-gofmt/ for a quick overview. This commit also cleansup imports on existing files.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhuss, sixolet The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
And changed order so that formatting and import reordering comes before compiling and testing
/lgtm |
…native#186) * feat(build.sh): Enable goimports for cleanup imports + cleanup imports Much like 'go fmt' for cleaning up go source, 'goimports' can help in properly formatting and grouping imports. See https://goinbigdata.com/goimports-vs-gofmt/ for a quick overview. This commit also cleansup imports on existing files. * fix(build): Add missing space for output on iterm * chore(build): Merged gofmt and goimports And changed order so that formatting and import reordering comes before compiling and testing
Much like 'go fmt' for cleaning up go source, 'goimports' can help
in properly formatting and grouping imports. See https://goinbigdata.com/goimports-vs-gofmt/
for a quick overview.
This commit also cleansup imports on existing files.