github: fix go linting
* Upgrade golangci-lint to a version built with go 1.21.x. The older version was a binary version built with go 1.20.x and it was failing against the newer code built with go 1.21.x * print the golangci-lint version in each run to see what version of go it was built with in case there are incompatibilties during the next upgrade * remove the linter config skipping over pkg/supervisor entirely and instead put in an override to ignore the `unused` linter for the pkg/supervisor testhelpers bits for unsed test functions necessary to satisfy the test interface.
This commit is contained in:
parent
23829c63de
commit
02bf0de83d
|
@ -311,7 +311,7 @@ jobs:
|
|||
- name: Install linters
|
||||
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.2
|
||||
- name: Run linters
|
||||
run: make generate && ./scripts/lint.sh -g lint
|
||||
run: make generate && golangci-lint --version && ./scripts/lint.sh -g lint
|
||||
- name: Ensure generated proto matches
|
||||
run: |
|
||||
rm -rf node/pkg/proto
|
||||
|
|
|
@ -22,3 +22,9 @@ linters:
|
|||
# - unconvert # disable because extra conversion typically don't hurt but can make code more clear
|
||||
- unparam
|
||||
- prealloc
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: pkg/supervisor/supervisor_testhelpers.go
|
||||
text: "^func.*supervisor.*(waitSettle|waitSettleError).*$"
|
||||
linters:
|
||||
- unused
|
||||
|
|
Loading…
Reference in New Issue