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

Clean up revive linter config, tweak golangci output #30980

Merged
merged 5 commits into from
May 18, 2024

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented May 15, 2024

The errorCode and warningCode options were removed at some point, they are not recognized by golangci-lint any more at least and they do not match their published json schema. confidence and ignore-generated-header are at the default value so does not need to be configured.

https://golangci-lint.run/usage/linters/#revive

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 15, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 15, 2024
@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 May 15, 2024
@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 May 15, 2024
@silverwind silverwind marked this pull request as draft May 15, 2024 15:49
@silverwind silverwind marked this pull request as ready for review May 16, 2024 22:50
@silverwind
Copy link
Member Author

silverwind commented May 16, 2024

Lint output tweaked, sort by file and show count of errors below.

go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2 run
modules/base/tool.go:70:2: increment-decrement: should replace minutes -= 1 with minutes-- (revive)
	minutes -= 1
	^
modules/base/tool.go:71:2: increment-decrement: should replace minutes += 1 with minutes++ (revive)
	minutes += 1
	^
2 issues:
* revive: 2
exit status 1
make: *** [Makefile:408: lint-go] Error 1

@silverwind silverwind changed the title Clean up revive linter config Clean up revive linter config, tweak golangci output May 16, 2024
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 17, 2024
@silverwind silverwind enabled auto-merge (squash) May 17, 2024 23:21
@silverwind silverwind merged commit 0289924 into go-gitea:main May 18, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone May 18, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 18, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 20, 2024
* giteaofficial/main:
  Fix "force private" logic (go-gitea#31012)
  [skip ci] Updated licenses and gitignores
  Improve reverse proxy documents and clarify the AppURL guessing behavior (go-gitea#31003)
  Fix bug on avatar (go-gitea#31008)
  Clean up revive linter config, tweak golangci output (go-gitea#30980)
  Simplify mirror repository API logic (go-gitea#30963)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/internal size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants