From 49984bb606369d25e8667b9217c84cf2473dd588 Mon Sep 17 00:00:00 2001 From: Carlo Teubner Date: Wed, 29 Oct 2025 00:23:52 +0000 Subject: [PATCH] =?UTF-8?q?.github:=20staticcheck-action=20=E2=86=92=20gol?= =?UTF-8?q?angci-lint-action=20(#2238)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit golangci-lint bundles many Go linters (https://golangci-lint.run/docs/linters/). For now, we are going with its default set of linters, which includes staticcheck, but with the errcheck linter explicitly excluded because it generates a lot of lints; I plan to address those and add errcheck in a subsequent contribution. --- .github/workflows/go.yml | 6 +++--- .golangci.yaml | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .golangci.yaml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 04866dde..0ccdea18 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -39,10 +39,10 @@ jobs: - name: Test run: go test -v ./... - - uses: dominikh/staticcheck-action@v1.4.0 + - name: golangci-lint + uses: golangci/golangci-lint-action@v8 with: - version: "2025.1.1" - install-go: false + version: v2.5.0 build: runs-on: ubuntu-latest diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 00000000..e8ecf0ee --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,7 @@ +version: "2" +linters: + disable: + - errcheck +issues: + max-issues-per-linter: 0 # no limit + max-same-issues: 0 # no limit