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

linting: add gofumpt #105

Merged
merged 8 commits into from
Mar 7, 2024
Merged

linting: add gofumpt #105

merged 8 commits into from
Mar 7, 2024

Conversation

geoknee
Copy link
Collaborator

@geoknee geoknee commented Feb 28, 2024

gofumpt is a more opinionated linter which (among other things) will complain if there are blank lines at the start or end of a function.

We have a few cases of that, and this rule often comes up during PR review. With this change, the rule is enforced in CI and applied on save for VSCode users.

Questions:

  • We may with to harmonize this with the approach in other optimism repos.

@geoknee geoknee marked this pull request as ready for review March 6, 2024 15:05
@geoknee geoknee requested review from a team as code owners March 6, 2024 15:05
@geoknee geoknee requested a review from trianglesphere March 6, 2024 15:05
Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

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

I like integrating this via golangci lint. IDK if I'd want to use it to replace gofmt/goimports in people's normal formatting

.vscode/settings.json Outdated Show resolved Hide resolved
.golangci.yml Show resolved Hide resolved
@geoknee geoknee changed the title linting: replace goimports with gofumpt linting: add gofumpt Mar 7, 2024
CONTRIBUTING.md Outdated Show resolved Hide resolved
geoknee and others added 3 commits March 7, 2024 13:29
@mds1 mds1 merged commit 2164106 into main Mar 7, 2024
10 checks passed
@mds1 mds1 deleted the gk/linting branch March 7, 2024 15:32
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.

3 participants