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

Fix code formating #17830

Merged
merged 4 commits into from Nov 27, 2021
Merged

Fix code formating #17830

merged 4 commits into from Nov 27, 2021

Conversation

mscherer
Copy link
Contributor

"make fmt" always want to change this, so better merge it so
we do not introduce unrelated changes when running "make fmt" later

Second attempt after #17829

"make fmt" always want to change this, so better merge it so
we do not introduce unrelated changes when running "make fmt" later
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Nov 26, 2021
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Nov 26, 2021

Background: we have our own golang import formatter, #17684, it groups the imports used by code first, and groups the dummy imports second. But our formatter doesn't format imports with comments. So in rare case the output fails lint.

@wxiaoguang
Copy link
Contributor

I just made a new commit, now the result of make fmt can always pass make lint.

@wxiaoguang wxiaoguang added topic/code-linting skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Nov 26, 2021
@wxiaoguang wxiaoguang added this to the 1.16.0 milestone Nov 26, 2021
@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 Nov 27, 2021
@wxiaoguang wxiaoguang merged commit 04c55e9 into go-gitea:main Nov 27, 2021
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
* fix formatter, format imports first, then go fmt
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
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.

None yet

4 participants