Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
51 changes: 32 additions & 19 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
golang 1.23.4
golang 1.27.0
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading