Skip to content

Commit 0c0804c

Browse files
authored
go1.18 support (#2438)
1 parent ec95236 commit 0c0804c

File tree

13 files changed

+197
-118
lines changed

13 files changed

+197
-118
lines changed

Diff for: .github/workflows/post-release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
- name: Install Go
1515
uses: actions/setup-go@v2
1616
with:
17-
go-version: 1.17
17+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
18+
go-version: 1.18
1819

1920
- name: Update GitHub action config
2021
run: make assets/github-action-config.json

Diff for: .github/workflows/pr-extra.yml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-go@v2
15+
with:
16+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
17+
go-version: 1.18
1518
- name: Run go list
1619
run: go list -json -m all > go.list
1720
- name: Nancy

Diff for: .github/workflows/pr.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77

88
env:
9-
GO_VERSION: 1.17
9+
GO_VERSION: 1.18
1010

1111
jobs:
1212
# Check if there any dirty change for go mod tidy
@@ -16,6 +16,7 @@ jobs:
1616
- name: Install Go
1717
uses: actions/setup-go@v2
1818
with:
19+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
1920
go-version: ${{ env.GO_VERSION }}
2021
- name: Checkout code
2122
uses: actions/checkout@v3
@@ -33,7 +34,9 @@ jobs:
3334
- name: Install Go
3435
uses: actions/setup-go@v2
3536
with:
36-
go-version: ${{ env.GO_VERSION }}
37+
go-version: 1.17 # TODO(ldez) the binary compiled with go1.17 doesn't work on go1.18
38+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
39+
# go-version: ${{ env.GO_VERSION }} # TODO(ldez) the binary compiled with go1.17 doesn't work on go1.18
3740
- name: lint
3841
uses: golangci/[email protected]
3942
with:
@@ -50,6 +53,7 @@ jobs:
5053
- name: Install Go
5154
uses: actions/setup-go@v2
5255
with:
56+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
5357
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
5458
- name: Run tests
5559
run: make.exe test
@@ -63,6 +67,7 @@ jobs:
6367
- name: Install Go
6468
uses: actions/setup-go@v2
6569
with:
70+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
6671
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
6772
- name: Run tests
6873
run: make test
@@ -73,13 +78,14 @@ jobs:
7378
strategy:
7479
matrix:
7580
golang:
76-
- 1.16
7781
- 1.17
82+
- 1.18
7883
steps:
7984
- uses: actions/checkout@v3
8085
- name: Install Go
8186
uses: actions/setup-go@v2
8287
with:
88+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
8389
go-version: ${{ matrix.golang }}
8490
- uses: actions/[email protected]
8591
with:
@@ -103,6 +109,7 @@ jobs:
103109
- name: Install Go
104110
uses: actions/setup-go@v2
105111
with:
112+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
106113
go-version: ${{ env.GO_VERSION }}
107114
- name: Check generated files are up to date
108115
run: make fast_check_generated

Diff for: .github/workflows/tag.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
- name: Install Go
1515
uses: actions/setup-go@v2
1616
with:
17-
go-version: 1.17
17+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
18+
go-version: 1.18
1819
- name: Unshallow
1920
run: git fetch --prune --unshallow
2021

@@ -40,7 +41,8 @@ jobs:
4041
- name: Install Go
4142
uses: actions/setup-go@v2
4243
with:
43-
go-version: 1.17
44+
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
45+
go-version: 1.18
4446

4547
- name: Unshallow
4648
run: git fetch --prune --unshallow

Diff for: .golangci.example.yml

+5
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ run:
6464
# If false (default) - golangci-lint acquires file lock on start.
6565
allow-parallel-runners: false
6666

67+
# Define the Go version limit.
68+
# Mainly related to generics support in go1.18.
69+
# Default: 1.17
70+
go: 1.18
71+
6772

6873
# output configuration options
6974
output:

Diff for: go.mod

+74-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/golangci/golangci-lint
22

3-
go 1.16
3+
go 1.18
44

55
require (
66
4d63.com/gochecknoglobals v0.1.0
@@ -19,7 +19,7 @@ require (
1919
github.com/breml/errchkjson v0.2.3
2020
github.com/butuzov/ireturn v0.1.1
2121
github.com/charithe/durationcheck v0.0.9
22-
github.com/daixiang0/gci v0.3.2
22+
github.com/daixiang0/gci v0.3.3
2323
github.com/denis-tingaikin/go-header v0.4.3
2424
github.com/esimonov/ifshort v1.0.4
2525
github.com/fatih/color v1.13.0
@@ -64,7 +64,6 @@ require (
6464
github.com/nishanths/predeclared v0.2.1
6565
github.com/pkg/errors v0.9.1
6666
github.com/polyfloyd/go-errorlint v0.0.0-20211125173453-6d6d39c5bb8b
67-
github.com/prometheus/procfs v0.6.0 // indirect
6867
github.com/quasilyte/go-ruleguard/dsl v0.3.17
6968
github.com/ryancurrah/gomodguard v1.2.3
7069
github.com/ryanrolds/sqlclosecheck v0.3.0
@@ -95,11 +94,81 @@ require (
9594
github.com/yagipy/maintidx v1.0.0
9695
github.com/yeya24/promlinter v0.1.1-0.20210918184747-d757024714a1
9796
gitlab.com/bosi/decorder v0.2.1
98-
golang.org/x/tools v0.1.9
97+
golang.org/x/tools v0.1.10
9998
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
10099
honnef.co/go/tools v0.2.2
101100
mvdan.cc/gofumpt v0.3.0
102101
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
103-
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
104102
mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5
105103
)
104+
105+
require (
106+
github.com/Masterminds/semver v1.5.0 // indirect
107+
github.com/beorn7/perks v1.0.1 // indirect
108+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
109+
github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect
110+
github.com/davecgh/go-spew v1.1.1 // indirect
111+
github.com/ettle/strcase v0.1.1 // indirect
112+
github.com/fatih/structtag v1.2.0 // indirect
113+
github.com/fsnotify/fsnotify v1.5.1 // indirect
114+
github.com/go-ole/go-ole v1.2.6 // indirect
115+
github.com/go-toolsmith/astcast v1.0.0 // indirect
116+
github.com/go-toolsmith/astcopy v1.0.0 // indirect
117+
github.com/go-toolsmith/astequal v1.0.1 // indirect
118+
github.com/go-toolsmith/astfmt v1.0.0 // indirect
119+
github.com/go-toolsmith/astp v1.0.0 // indirect
120+
github.com/go-toolsmith/strparse v1.0.0 // indirect
121+
github.com/go-toolsmith/typep v1.0.2 // indirect
122+
github.com/gobwas/glob v0.2.3 // indirect
123+
github.com/golang/protobuf v1.5.2 // indirect
124+
github.com/google/go-cmp v0.5.7 // indirect
125+
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
126+
github.com/gostaticanalysis/comment v1.4.2 // indirect
127+
github.com/hashicorp/errwrap v1.0.0 // indirect
128+
github.com/hashicorp/hcl v1.0.0 // indirect
129+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
130+
github.com/kisielk/gotool v1.0.0 // indirect
131+
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
132+
github.com/magiconair/properties v1.8.5 // indirect
133+
github.com/mattn/go-isatty v0.0.14 // indirect
134+
github.com/mattn/go-runewidth v0.0.9 // indirect
135+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
136+
github.com/mitchellh/mapstructure v1.4.3 // indirect
137+
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
138+
github.com/olekukonko/tablewriter v0.0.5 // indirect
139+
github.com/pelletier/go-toml v1.9.4 // indirect
140+
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
141+
github.com/pmezard/go-difflib v1.0.0 // indirect
142+
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
143+
github.com/prometheus/client_golang v1.7.1 // indirect
144+
github.com/prometheus/client_model v0.2.0 // indirect
145+
github.com/prometheus/common v0.10.0 // indirect
146+
github.com/prometheus/procfs v0.6.0 // indirect
147+
github.com/quasilyte/go-ruleguard v0.3.15 // indirect
148+
github.com/quasilyte/gogrep v0.0.0-20220103110004-ffaa07af02e3 // indirect
149+
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
150+
github.com/spf13/afero v1.6.0 // indirect
151+
github.com/spf13/cast v1.4.1 // indirect
152+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
153+
github.com/stretchr/objx v0.1.1 // indirect
154+
github.com/subosito/gotenv v1.2.0 // indirect
155+
github.com/tklauser/go-sysconf v0.3.9 // indirect
156+
github.com/tklauser/numcpus v0.3.0 // indirect
157+
github.com/valyala/bytebufferpool v1.0.0 // indirect
158+
github.com/yusufpapurcu/wmi v1.2.2 // indirect
159+
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
160+
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
161+
golang.org/x/text v0.3.7 // indirect
162+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
163+
google.golang.org/protobuf v1.27.1 // indirect
164+
gopkg.in/ini.v1 v1.66.2 // indirect
165+
gopkg.in/yaml.v2 v2.4.0 // indirect
166+
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
167+
)
168+
169+
require github.com/hashicorp/go-version v1.2.1
170+
171+
require (
172+
github.com/hexops/gotextdiff v1.0.3 // indirect
173+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
174+
)

0 commit comments

Comments
 (0)