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: Update gofmt usage #320

Merged
merged 1 commit into from
Oct 1, 2024
Merged

chore: Update gofmt usage #320

merged 1 commit into from
Oct 1, 2024

Conversation

nieomylnieja
Copy link
Contributor

By default go fmt calls gofmt -w -l, with the recent golangci linter changes it seems it's not enough, and rightfully so.
It now requires the files to be formatted with -s flag which simplifies code, for instance removing unnecessary type literals in slice declarations.

Example linter fail due to unsimplified code: https://github.com/nobl9/nobl9-go/actions/runs/11123928510/job/30908411560

@n9-machine-user n9-machine-user added chore Routine or minor duty task patch Bug fixes and security updates labels Oct 1, 2024
@nieomylnieja nieomylnieja enabled auto-merge (squash) October 1, 2024 12:01
@nieomylnieja nieomylnieja merged commit bf83e57 into main Oct 1, 2024
5 checks passed
@nieomylnieja nieomylnieja deleted the update-gofmt-usage branch October 1, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Routine or minor duty task patch Bug fixes and security updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants