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(lint): replace loopvar linter #7442

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

kobakaku
Copy link
Contributor

@kobakaku kobakaku commented Oct 13, 2024

Description

Replace loopvar linter in the .golangci.yml.

closes: #7441

TODO

Need to fix lint errors in another PR.

Test

$ make lint
--> Running linter
linting module github.com/cosmos/ibc-go/v9 [2024-10-13T04:43:49]
modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go:143:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
                tc := tc
                ^
modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go:320:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
                tc := tc
                ^
modules/apps/27-interchain-accounts/controller/keeper/migrations_test.go:45:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
                tc := tc
                ^
modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go:70:4: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
                        tc := tc
                        ^
modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go:150:4: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
                        tc := tc
                        ^
modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go:244:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
                tc := tc

.... (many lint errors below)

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.

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Thank you @kobakaku!

Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

Need to fix lint errors in another PR.

Is this supposed to result in some linting errors? How come they don't show up? Either way, this lgtm but if linting errors do pop up, might make sense to fix here?

@damiannolan damiannolan added this pull request to the merge queue Oct 14, 2024
Merged via the queue into cosmos:main with commit 0f4b8dd Oct 14, 2024
79 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.

'exportloopref' is deprecated
4 participants