[release-1.4] Bump golangci-lint to v2#1178
Conversation
|
Should we keep linting Windows files? I'd need to disable the formatter |
Manual backport of etcd-io#954 / 675a3be. Silence linters that fail with the current state of the code, as we don't want to change the stable release code. Signed-off-by: Ivan Valdes <ivan@vald.es>
982d57a to
0ee7f75
Compare
Can we fix the linter error? |
|
I don't think so, it's an obscure error that we found before, which Windows complains of every file's first line: https://github.com/etcd-io/bbolt/actions/runs/23867689295/job/69591112978?pr=1178#step:7:185 An alternative approach would be to use a separate configuration file for Windows that disables I also don't see much value in linting every file on Linux or Windows. In my opinion, we should have a single Lint CI workflow rather than appending the step to every workflow. |
+1, I hit the same issue last year iirc I recall I have tried using V2 to resolve it, but then hit the go-version used
+1, good refactoring 👍🏽
I would keep this as the last resort, and we could skip it without a separate file imho |
Two questions:
Sounds good to me. |
These are good questions. We have been trying to address this issue several times (i.e., #1073, #994). We don't know why it's not happening on the main branch. We thought it needed a newer Go version, but after the bump, it was still failing. The problem now is that we need to bump golangci-lint to bump Go. So, that's why I suggest disabling linting on Windows. In the end, the only Windows file that the Linux linter is not linting is I would like to get this going, to not keep blocking the Go version bump.
I'll open a PR targeting the main branch to open the discussion. |
OK, we don't have to spend too much time on this for stable releases. Pls feel free to workaround it. |
This has been a dead end for several attempts. Golangci-lint fails for every file for Windows. The easier approach, given this is a stable rlease branch is to disable linting in Windows. Signed-off-by: Ivan Valdes <ivan@vald.es>
Alright, I removed linting on Windows. PTAL, @ahrtr. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, ivanvc The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Manual backport of #954 / 675a3be.
Silence linters that fail with the current state of the code, as we don't want to change the stable release code.
Trying to unblock #1157 / The Go version bump (etcd-io/etcd#21458).