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

Format whole codebase #633

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Format whole codebase #633

merged 1 commit into from
Oct 31, 2024

Conversation

justonedev1
Copy link
Collaborator

@justonedev1 justonedev1 commented Oct 30, 2024

I formated everything with gofmt -s -w . from alidist environment golang, so other PR's not polluted by randomly reformatting whole gofile.

@teo
Copy link
Member

teo commented Oct 30, 2024

I would prefer to let our IDEs format as we go instead of this gofmt pass on everything, but I let @knopers8 decide.

@justonedev1
Copy link
Collaborator Author

sorry, but no. You prefer that there are format changes in every PR? Look here https://github.com/AliceO2Group/Control/pull/632/files ? One line change causes whole file to be reformated, so I need to concentrate a bit more to figure out which changes are really relevant and which are just formatting It might be possible to create github hook that reformats the PR automatically, but having format changes on almost every PR is absolutely no go. Plus go fmt or gofmt are meant to be used by golang developers.

Copy link
Collaborator

@knopers8 knopers8 left a comment

Choose a reason for hiding this comment

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

Personally, I never proposed myself to do it to avoid obfuscating git blame, but I am not fundamentally against. Let's do it.

@teo
Copy link
Member

teo commented Oct 31, 2024

sorry, but no. You prefer that there are format changes in every PR? Look here https://github.com/AliceO2Group/Control/pull/632/files ? One line change causes whole file to be reformated, so I need to concentrate a bit more to figure out which changes are really relevant and which are just formatting It might be possible to create github hook that reformats the PR automatically, but having format changes on almost every PR is absolutely no go. Plus go fmt or gofmt are meant to be used by golang developers.

To be clear I don't object to go fmt, it's what the IDE uses as well and it's the only reasonable way to ever format Go code. I simply don't mind format changes in every PR, I am totally ok with them and I think they are better than obfuscating git blame.

@knopers8
Copy link
Collaborator

Merging then.

@knopers8 knopers8 merged commit 8bf8da1 into master Oct 31, 2024
2 checks passed
@knopers8 knopers8 deleted the fmt_all branch October 31, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants