Skip to content

Go 1.19 format #20758

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 8 commits into from
Aug 31, 2022
Merged

Go 1.19 format #20758

merged 8 commits into from
Aug 31, 2022

Conversation

jolheiser
Copy link
Member

@jolheiser jolheiser commented Aug 11, 2022

As of Go 1.19, doc comments have been enhanced and gofmt now formats them to be clearer.

Thankfully, for the most part it's backwards compatible. That is, I formatted using a local 1.19, then when re-running make fmt using 1.18 there were no further changes.

Therefore, I think this PR should fix cases where contributors have 1.19 locally and thus make fmt would cause unwanted noise in their PR.


The one place in our codebase that seemed to behave differently was in our CSV test where I replaced a literal tab with \t, which is treated the same within the test and worked with the formatter on both versions.

Signed-off-by: jolheiser <[email protected]>
Signed-off-by: jolheiser <[email protected]>
@jolheiser jolheiser added topic/code-linting skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Aug 11, 2022
@jolheiser jolheiser added this to the 1.18.0 milestone Aug 11, 2022
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 11, 2022
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

Small hint: comparing with hiding space makes the diff clearer. 😁

https://github.com/go-gitea/gitea/pull/20758/files?diff=unified&w=1


Update: CI failure is related to swagger, waiting for upstream, added a blocked label

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 11, 2022
@wxiaoguang wxiaoguang added the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Aug 11, 2022
John Olheiser and others added 3 commits August 15, 2022 13:40
@6543
Copy link
Member

6543 commented Aug 30, 2022

go-swagger/go-swagger#2808 got merged & tagged (v0.30.0)

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 30, 2022
@6543 6543 removed the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Aug 30, 2022
@jolheiser jolheiser merged commit a48d6ba into go-gitea:main Aug 31, 2022
@jolheiser jolheiser deleted the fmt branch August 31, 2022 02:15
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 31, 2022
* upstream/main:
  Go 1.19 format (go-gitea#20758)
  [skip ci] Updated translations via Crowdin
wxiaoguang added a commit that referenced this pull request Sep 22, 2022
The images used by Gitea's drone pipeline were upgraded to Go 1.19.x
It causes the lint fails because Go 1.19 uses new code format.

This PR partially backport #20758 (including the emoji-data sync),
partially fix the format manually.
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/code-linting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants