From 1f17803421fffa86edf6aa0c21cca2594f7e6786 Mon Sep 17 00:00:00 2001 From: Jan Hartman Date: Fri, 2 Oct 2026 17:52:43 +0000 Subject: [PATCH] chore/dev: Bump Go to 1.27 Keep the repository on a supported Go release by updating go.mod, .tool-versions, and CI workflow Go versions to 1.27. Sourcegraph-Batch-Change: https://sourcegraph.sourcegraph.com/batch-change-agents/1204 --- .github/workflows/go.yml | 7 +++--- .golangci.yml | 51 +++++++++++++++++++++++++--------------- .tool-versions | 2 +- go.mod | 2 +- 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cf7b5e4..2270326 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -29,7 +29,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.25.x + go-version: 1.27.x - name: Enable pulling Go modules from private sourcegrahp/sourcegraph run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/" - name: Check Go module tidiness @@ -44,17 +44,16 @@ jobs: exit 1 fi - name: Run golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 with: version: latest - install-mode: goinstall args: --timeout=30m test: name: Test strategy: matrix: - go-version: [ 1.25.x ] + go-version: [ 1.27.x ] platform: [ ubuntu-latest ] runs-on: ${{ matrix.platform }} steps: diff --git a/.golangci.yml b/.golangci.yml index 6e8084f..1242561 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,33 +1,46 @@ -linters-settings: - nakedret: - max-func-lines: 0 # Disallow any unnamed return statement - depguard: - rules: - main: - deny: - - pkg: "errors" - desc: use "github.com/sourcegraph/sourcegraph/lib/errors" instead - -issues: - exclude-rules: - - path: _test\.go - linters: - - gosec +version: "2" linters: enable: - unused - errcheck - - gosimple - govet - ineffassign - staticcheck - - typecheck - nakedret - - gofmt - rowserrcheck - unconvert - - goimports - unparam - depguard - gosec + settings: + nakedret: + max-func-lines: 0 # Disallow any unnamed return statement + depguard: + rules: + main: + deny: + - pkg: "errors" + desc: use "github.com/sourcegraph/sourcegraph/lib/errors" instead + staticcheck: + # Keep v1 behaviour: staticcheck (SA) + gosimple (S1) checks only. + checks: + - all + - -ST* + - -QF* + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - path: _test\.go + linters: + - gosec + +formatters: + enable: + - gofmt + - goimports diff --git a/.tool-versions b/.tool-versions index ee4aa2f..eeb2d59 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -golang 1.23.4 \ No newline at end of file +golang 1.27.0 \ No newline at end of file diff --git a/go.mod b/go.mod index 3011321..6626050 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/sourcegraph/sourcegraph-accounts-sdk-go -go 1.25.0 +go 1.27.0 require ( cloud.google.com/go/pubsub/v2 v2.6.0