Skip to content

Commit f703df7

Browse files
build: upgrade to Go 1.25 and golangci-lint 2.x
- Bump Go version to 1.25.7 - Upgrade golangci-lint to v2.9.0 and migrate config to v2 schema - Move goimports from linter to formatter section - Add govet shadow check - Update CircleCI and GitHub Actions Go versions - Upgrade golangci-lint-action to v9 - Add ST1005 exclusion for existing error strings Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 116cb0e commit f703df7

File tree

6 files changed

+46
-30
lines changed

6 files changed

+46
-30
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ orbs:
66
go_image: &go_image
77
resource_class: small
88
docker:
9-
- image: cimg/go:1.23
9+
- image: cimg/go:1.25
1010

1111
jobs:
1212
security-scans:

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ jobs:
1414
- name: Set up Go
1515
uses: actions/setup-go@v3
1616
with:
17-
go-version: 1.23.2
17+
go-version: '1.25'
1818

1919
- name: Lint
20-
uses: golangci/golangci-lint-action@v3
20+
uses: golangci/golangci-lint-action@v9
21+
with:
22+
version: v2.9.0
2123

2224
- name: Build
2325
run: go build -v -o parlay

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
name: Set up Go
2222
uses: actions/setup-go@v4
2323
with:
24-
go-version: 1.23
24+
go-version: '1.25'
2525
check-latest: true
2626
- run: go version
2727
- name: Install Syft

.github/workflows/security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Go
2525
uses: actions/setup-go@v3
2626
with:
27-
go-version: 1.23
27+
go-version: '1.25'
2828

2929
- uses: snyk/actions/setup@master
3030

.golangci.yaml

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,44 @@
1+
version: "2"
12
run:
23
issues-exit-code: 1
3-
color: always
4-
max-same-issues: 0
5-
max-issues-per-linter: 0
64
tests: true
7-
timeout: 5m
8-
95
linters:
106
enable:
11-
- errcheck
12-
- goimports
13-
- gosimple
14-
- govet
15-
- ineffassign
167
- misspell
17-
- staticcheck
18-
- typecheck
19-
- unused
20-
21-
linters-settings:
22-
errcheck:
23-
check-blank: true
24-
check-type-assertions: true
25-
govet:
26-
check-shadowing: true
27-
goimports:
28-
local-prefixes: github.com/snyk/parlay
29-
misspell:
30-
locale: US
8+
settings:
9+
errcheck:
10+
check-type-assertions: true
11+
check-blank: true
12+
govet:
13+
enable:
14+
- shadow
15+
misspell:
16+
locale: US
17+
exclusions:
18+
generated: lax
19+
presets:
20+
- comments
21+
- common-false-positives
22+
- legacy
23+
- std-error-handling
24+
rules:
25+
- linters:
26+
- staticcheck
27+
text: "ST1005:"
28+
paths:
29+
- third_party$
30+
- builtin$
31+
- examples$
32+
formatters:
33+
enable:
34+
- goimports
35+
settings:
36+
goimports:
37+
local-prefixes:
38+
- github.com/snyk/parlay
39+
exclusions:
40+
generated: lax
41+
paths:
42+
- third_party$
43+
- builtin$
44+
- examples$

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/snyk/parlay
22

3-
go 1.23
3+
go 1.25.7
44

55
require (
66
github.com/CycloneDX/cyclonedx-go v0.9.2

0 commit comments

Comments
 (0)