diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b41cf4a88..0529ee008 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,9 +31,10 @@ jobs: run: make check-docs - name: Check for linting errors - uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # pin@3.6.0 + uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1 with: - version: latest + install-mode: "goinstall" + version: 2059b18a39d559552839476ba78ce6acaa499b43 # v1.59.0 args: -v -c .golangci.yml unit-tests: diff --git a/.golangci.yml b/.golangci.yml index d523aa57e..96a6c391c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -4,9 +4,6 @@ run: linters: disable-all: true - # We are commenting a couple of them, - # so we can fix them one at a time - # as the effort is non-trivial. enable: - unused - gofmt @@ -36,9 +33,14 @@ linters-settings: issues: exclude-use-default: false + # We are excluding a couple of them, + # so we can fix them one at a time + # as the effort is non-trivial. exclude: - "should have a package comment" - "package comment should be of the form" - "should have comment" - "be unexported" - "blank-imports" + - "unused-parameter" + - "Error return value of (.+) is not checked" diff --git a/Makefile b/Makefile index 007a73b6e..ada75aec7 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ $(GO_BIN)/mockgen: $(GO_BIN)/golangci-lint: ${call print, "Installing golangci-lint"} - @go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest + @go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@2059b18a39d559552839476ba78ce6acaa499b43 # v1.59.0 $(GO_BIN)/govulncheck: ${call print, "Installing go vulnerability checker"}