Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gofumpt the repo #1207

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

Merged
merged 2 commits into from
Jun 24, 2023
Merged

gofumpt the repo #1207

merged 2 commits into from
Jun 24, 2023

Conversation

flimzy
Copy link
Member

@flimzy flimzy commented Jun 19, 2023

This runs gofumpt on the entire repo. This is the default formatter I tend to use, and it was reformatting every file as I changed it. It seems cleaner to do it all in one fell swoop, assuming we agree to use this format.

https://github.com/mvdan/gofumpt

@github-actions

This comment has been minimized.

Copy link
Member

@nevkontakte nevkontakte left a comment

Choose a reason for hiding this comment

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

I don't mind gofumpt (even though I don't use it myself), but it seems like if we don't enforce the stricter formatting it would drift away through my and other people changes. Is that a concern for you?

@flimzy
Copy link
Member Author

flimzy commented Jun 21, 2023

It's completely open to discussion. I'm not fixated on gofumpt, although I do quite like it. And it will be enforced by the linter added in the other PR, if we choose to go this route.

@nevkontakte
Copy link
Member

The only argument against gofumpt I can think of is that it increases barrier to entry for new contributors. Was that a problem in your other projects?

@flimzy
Copy link
Member Author

flimzy commented Jun 21, 2023

It's never been a serious barrier, however I've also not used it on an active open source project before, either.

@nevkontakte
Copy link
Member

Then I am open to giving it a shot, as long as we document it in https://github.com/gopherjs/gopherjs/wiki/Developer-Guidelines. We can always revert back to gofmt if we see people struggling.

@github-actions
Copy link

Reference app: jQuery TodoMVC (acf500a6c32a83d8c4582d967b09a65febf0e120)

BRANCH ORIGINAL MINIFIED COMPRESSED (GZIP)
Pull request (gofumpt) 2,948,040 bytes 1,934,883 bytes 382,916 bytes
Target branch (master) 0.00% increase (0 bytes) 0.00% increase (0 bytes) 0.00% increase (0 bytes)

#outputSize

@flimzy flimzy merged commit 714862f into master Jun 24, 2023
@flimzy flimzy deleted the gofumpt branch June 24, 2023 19:02
@flimzy
Copy link
Member Author

flimzy commented Jun 24, 2023

Merged, and wiki entry updated.

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.

2 participants