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

chore: fix linting #15

Merged
merged 2 commits into from
Oct 9, 2024
Merged

chore: fix linting #15

merged 2 commits into from
Oct 9, 2024

Conversation

basti1302
Copy link
Contributor

  • 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

@@ -47,6 +47,8 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- uses: perses/[email protected]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- 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)

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- 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

Copy link
Contributor Author

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.

@basti1302
Copy link
Contributor Author

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]>
@basti1302
Copy link
Contributor Author

@Nexucis I applied your suggestion, CI is still green 👍

Copy link
Member

@Nexucis Nexucis left a comment

Choose a reason for hiding this comment

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

perfect, thank you 🙏

@Nexucis Nexucis merged commit b4c59f1 into perses:main Oct 9, 2024
5 checks passed
@basti1302 basti1302 deleted the fix-ci-lint branch October 14, 2024 15:52
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.

2 participants