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

Remove unnecessary variable assignments #17695

Merged
merged 4 commits into from Nov 18, 2021
Merged

Conversation

Gusted
Copy link
Contributor

@Gusted Gusted commented Nov 17, 2021

  • Enable ineffassign

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Nov 17, 2021
Copy link
Member

@silverwind silverwind left a comment

Choose a reason for hiding this comment

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

Seems like stuff a linter should be able to catch.

@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 17, 2021
@Gusted
Copy link
Contributor Author

Gusted commented Nov 17, 2021

Seems like stuff a linter should be able to catch.

We can enable ineffassign linter on golangci-lint to do this.

@Gusted
Copy link
Contributor Author

Gusted commented Nov 17, 2021

ineffassign is now enabled with fb6c628

@lunny
Copy link
Member

lunny commented Nov 18, 2021

make L-G-T-M work.

@lunny lunny merged commit c98dd7a into go-gitea:main Nov 18, 2021
@lunny
Copy link
Member

lunny commented Nov 18, 2021

@zeripath Since it didn't affect any feature, I moved this to kind/lint

@Gusted Gusted deleted the unnecessary-assigns branch November 24, 2021 08:26
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
* Remove unnecessary variable assignments

As title

* enable ineffassign

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@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. topic/code-linting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants