-
Notifications
You must be signed in to change notification settings - Fork 6
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
chore: fix linting #15
Conversation
basti1302
commented
Oct 9, 2024
- pin the Go version used to run golangci-lint to Go 1.22
- fix linting issues reported by golangci-lint (superfluos nil checks for slices)
- remove redundant package aliases
.github/workflows/go.yml
Outdated
@@ -47,6 +47,8 @@ jobs: | |||
- name: checkout | |||
uses: actions/checkout@v4 | |||
- uses: perses/[email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: perses/github-actions@v0.1.0 | |
- uses: perses/github-actions@v0.6.0 |
With that you can get Golang v1.23 and then you can upgrade golangci-lint to the latest version (v1.61.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: perses/github-actions@v0.1.0 | |
- uses: perses/github-actions@v0.6.0 | |
- uses: ./.github/perses-ci/actions/setup_environment | |
with: | |
enable_go: true | |
enable_go_cache: false | |
enable_npm: false | |
- name: golangci-lint | |
uses: golangci/[email protected] | |
with: | |
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | |
version: v1.61.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll give that a try.
I wrote in the last PR that I don't know exactly how to fix the linting but after thinking again this should actually do it (pin the Go version in the GH action). |
* pin the Go version used to run golangci-lint to Go 1.22 * fix linting issues reported by golangci-lint (superfluos nil checks for slices) * remove redundant package aliases Signed-off-by: Bastian Krol <[email protected]>
Signed-off-by: Bastian Krol <[email protected]>
@Nexucis I applied your suggestion, CI is still green 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect, thank you 🙏