From a2387e1a76a5ee7848c5f1ab4c9b839b6921ed48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Soul=C3=A9?= Date: Mon, 15 Sep 2025 16:26:40 +0200 Subject: [PATCH] ci: test with go1.25 & golangci-lint v2.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime Soulé --- .github/workflows/ci.yml | 23 +++++-------------- .golangci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 18 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e829f5..7ef9168 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,10 @@ jobs: test: strategy: matrix: - go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, tip] + go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x, 1.24.x, tip] full-tests: [false] include: - - go-version: 1.21.x + - go-version: 1.25.x full-tests: true runs-on: ubuntu-latest @@ -32,21 +32,8 @@ jobs: if: matrix.full-tests run: | curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | - sh -s -- -b $HOME/go/bin v1.54.1 - $HOME/go/bin/golangci-lint run --max-issues-per-linter 0 \ - --max-same-issues 0 \ - -E bidichk \ - -E exportloopref \ - -E gocritic \ - -E godot \ - -E goimports \ - -E maligned \ - -E misspell \ - -E prealloc \ - -E revive \ - -E unconvert \ - -E whitespace \ - ./... + sh -s -- -b $HOME/go/bin v2.4.0 + $HOME/go/bin/golangci-lint run - name: Testing continue-on-error: ${{ matrix.go-version == 'tip' }} @@ -63,5 +50,5 @@ jobs: env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - go install github.com/mattn/goveralls@v0.0.11 + go install github.com/mattn/goveralls@v0.0.12 goveralls -coverprofile=coverage.out -service=github diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..28e9319 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,48 @@ +version: "2" +issues: + max-issues-per-linter: 0 + max-same-issues: 0 +run: + go: '1.16' +linters: + default: none + enable: + - asasalint + - asciicheck + - bidichk + - durationcheck + - errcheck + - gocritic + - godot + - govet + - importas + - ineffassign + - misspell + - prealloc + - revive + - staticcheck + - testableexamples + - unconvert + - unused + - wastedassign + - whitespace + settings: + revive: + rules: + - name: unused-parameter + disabled: true + exclusions: + rules: + - path: internal/dark/bypass.go + text: "const \\w+ is unused" +formatters: + enable: + - gci + - goimports + settings: + gci: + sections: + - standard + - default + - localmodule + custom-order: true