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

[WIP] fix: fix errors reported by Lint CI. #3435

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mo3et
Copy link
Contributor

@mo3et mo3et commented Oct 10, 2024

Description (what this PR does / why we need it):

fix errors reported by Lint CI when this PR merged.

Which issue(s) this PR fixes (resolves / be part of):

This CI report need to use blank replace unused ctx. And CI config fields is deprecated. This PR is fix it.

Other special notes for the reviewers:

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 10, 2024
@@ -99,7 +99,6 @@ func (a *App) Run() error {
}
}
for _, srv := range a.opts.servers {
srv := srv
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kratos on  fix/lint [!] via 🐹 v1.23.2 
➜ golangci-lint run
app.go:102:3: The copy of the 'for' variable "srv" can be deleted (Go 1.22+) (copyloopvar)
                srv := srv
                ^

fix error by copyloopvar. But this lint need change go version to 1.22 in Go.Mod. So i just run in local.

@@ -31,6 +31,5 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.3
working-directory: ${{ matrix.workdir }}
skip-pkg-cache: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

skip-pkg-cache is remove in v5.0.0+.

https:/marketplace/actions/golangci-lint#compatibility

@mo3et mo3et changed the title fix: fix errors reported by Lint CI. [WIP] fix: fix errors reported by Lint CI. Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant