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

CI: Add gofmt check in lint #263

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

singh1203
Copy link
Contributor

@singh1203 singh1203 commented Jan 29, 2025

Fixes: #58

What changes are included in this PR?

Added the gofmt check in the pre-commit-config.yml, which identifies files that need gofmt linting and make proper linting.

Are these changes tested?

Yes, I tested it on my forked repository example here

Signed-off-by: Saurabh Kumar Singh <[email protected]>
@zeroshade
Copy link
Member

Would it make more sense to include this in the golangci configuration that we use with pre-commit instead? Particularly if we could have it so that pre-commit runs gofmt for the user too

@singh1203
Copy link
Contributor Author

Would it make more sense to include this in the golangci configuration that we use with pre-commit instead? Particularly if we could have it so that pre-commit runs gofmt for the user too

Yes, you are correct. I raised the same question in yesterday's Arrow community meeting. I will incorporate the changes as per the review.

@singh1203
Copy link
Contributor Author

Would it make more sense to include this in the golangci configuration that we use with pre-commit instead? Particularly if we could have it so that pre-commit runs gofmt for the user too

@zeroshade I made changes by adding a hook, which you can see here. This raises the question: do I need to commit the changed files after running pre-commit cmd locally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Go][CI]: Run gofmt check in CI
2 participants