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

chore: run goimports-reviser to order imports #378

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Apr 8, 2021

This is the first time I am using goimports-reviser to order our imports.
As a best practice, we must have a clean and understandable order of imports
and this tool might help us to do so.

https://github.com/incu6us/goimports-reviser

Commands I ran:

$ go get github.com/incu6us/goimports-reviser
$ find $(go list -f {{.Dir}} ./...) -name \*.go -type f -exec goimports-reviser -file-path {} -project-name github.com/lacework/go-sdk \;

TODO

Discuss if this will be something we would like to adopt.

Signed-off-by: Salim Afiune Maya [email protected]

@afiune afiune added the chore Code maintenance label Apr 8, 2021
@afiune afiune requested a review from a team April 8, 2021 23:12
@afiune afiune self-assigned this Apr 8, 2021
@dmurray-lacework
Copy link
Collaborator

@afiune If I'm reading correctly, it also runs a gofmt perhaps we should replace our current make fmt command?

Copy link
Collaborator

@dmurray-lacework dmurray-lacework left a comment

Choose a reason for hiding this comment

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

Approved this PR, but I'd like to see this replace our make fmt command. Provided that it does the same job with the addition of ordering imports

@afiune afiune merged commit 44b8e58 into main Apr 9, 2021
@afiune afiune deleted the afiune/goimports-reviser branch April 9, 2021 22:43
This was referenced Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Code maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants