Skip to content

chore(all): remove copy of the 'for' variable #8195

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 6 commits into from
Apr 3, 2025

Conversation

jjjike2021
Copy link
Contributor

Description

linter:

modules/core/genesis_test.go:284:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
                tc := tc
                ^
modules/core/genesis_test.go:421:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
                tc := tc
                ^
modules/core/genesis_test.go:449:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)

modules/core/04-channel/simulation/decoder_test.go:78:3: The copy of the 'for' variable "i" can be deleted (Go 1.22+) (copyloopvar)
                i, tt := i, tt

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@faddat
Copy link
Contributor

faddat commented Mar 23, 2025

thank you!

this helps me sleep better

@gjermundgaraba
Copy link
Contributor

This is a good one, but I believe we have a lot of these around. Would you mind taking a closer look at the rest of the repo and fix this in a more cohesive way (so we stay consistent)

@faddat
Copy link
Contributor

faddat commented Apr 2, 2025

I would be really happy too! I started to do this last night actually.

Just so you know, it will be necessary to upgrade go, because that will get us the latest set of linters. I will toss in a PR later today.

@jjjike2021 jjjike2021 changed the title chore: remove copy of the 'for' variable chore(all): remove copy of the 'for' variable Apr 2, 2025
@jjjike2021
Copy link
Contributor Author

This is a good one, but I believe we have a lot of these around. Would you mind taking a closer look at the rest of the repo and fix this in a more cohesive way (so we stay consistent)

@gjermundgaraba checked whole codespace

@gjermundgaraba gjermundgaraba enabled auto-merge April 3, 2025 00:19
@gjermundgaraba gjermundgaraba added this pull request to the merge queue Apr 3, 2025
Merged via the queue into cosmos:main with commit e6578fa Apr 3, 2025
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants