-
-
Notifications
You must be signed in to change notification settings - Fork 867
fix: add golangci-lint setup action and fix lint issue #592
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #592 +/- ##
==========================================
+ Coverage 68.49% 68.89% +0.39%
==========================================
Files 11 11
Lines 1073 1061 -12
==========================================
- Hits 735 731 -4
+ Misses 247 243 -4
+ Partials 91 87 -4 ☔ View full report in Codecov by Sentry. |
- name: Install golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.59 |
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.
Tip: You could have used "latest" so you don't have to maintain it
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.
fyi, Same reply from the other comment, but i'll throw in tools like renovate exist so you can automate updating things, while keeping consistent build experience.
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.
I'm sure dependabot cannot touch this argument of an action. It can bump the action version. But not its argument.
But maybe renovate can do it, so it would be fine
@@ -20,11 +20,14 @@ jobs: | |||
uses: actions/setup-go@v4 | |||
with: | |||
go-version: ^1.22 |
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.
Not related to your change but related to my other comment
Here you can use "stable" it will always use the latest version and you don't have to maintain it
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.
We could but it has downsides as well. It may be "easier" to maintain but may break all the users of the project, which has a bigger impact than just change the version in every few months. See https://vsupalov.com/docker-latest-tag/
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.
We could but it has downsides as well. It may be "easier" to maintain but may break all the users of the project, which has a bigger impact than just change the version in every few months. See https://vsupalov.com/docker-latest-tag/
Very good read, I get it.
The
make check
linting step failed: https://github.com/cosmtrek/air/actions/runs/9240465156/job/25420774320. The build step running in each PR is broken withgolangci-lint: command not found
issue: https://github.com/cosmtrek/air/actions/runs/9149739894/job/25364966455#step:4:13