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

.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

.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

.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

.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

.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:

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)