ci: bump to go 1.23 (#453)
Upgrade to Go 1.23. Upgrade also requires bumping `golangci-lint` to v1.62.2, and upgrading third-party test versions for some failing cases.
This commit is contained in:
committed by
GitHub
parent
3b84ecd27b
commit
b985ff5775
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.21.x, 1.22.x]
|
||||
go-version: [1.22.x, 1.23.x]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Go
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
|
||||
2
.github/workflows/deps.yml
vendored
2
.github/workflows/deps.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
with:
|
||||
|
||||
2
.github/workflows/metadata.yml
vendored
2
.github/workflows/metadata.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
with:
|
||||
|
||||
66
.github/workflows/packages.yml
vendored
66
.github/workflows/packages.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -180,7 +180,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -217,7 +217,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -252,7 +252,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -290,7 +290,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -325,7 +325,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -360,7 +360,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -395,7 +395,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -445,7 +445,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -496,7 +496,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -549,7 +549,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -602,7 +602,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -647,7 +647,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -682,7 +682,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -719,7 +719,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -756,7 +756,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -791,7 +791,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -826,7 +826,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -837,7 +837,7 @@ jobs:
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
with:
|
||||
repository: golang/crypto
|
||||
ref: 089bfa5675191fd96a44247682f76ebca03d7916
|
||||
ref: v0.24.0
|
||||
path: crypto
|
||||
persist-credentials: false
|
||||
- name: Avo Module Replacement
|
||||
@@ -861,7 +861,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -896,7 +896,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -936,7 +936,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -971,7 +971,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -982,7 +982,7 @@ jobs:
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
with:
|
||||
repository: golang/go
|
||||
ref: go1.20.1
|
||||
ref: go1.23.4
|
||||
path: go
|
||||
persist-credentials: false
|
||||
- name: Compile Go Toolchain
|
||||
@@ -1009,7 +1009,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -1020,7 +1020,7 @@ jobs:
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
with:
|
||||
repository: golang/go
|
||||
ref: go1.20.1
|
||||
ref: go1.23.4
|
||||
path: go
|
||||
persist-credentials: false
|
||||
- name: Compile Go Toolchain
|
||||
@@ -1047,7 +1047,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -1082,7 +1082,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -1117,7 +1117,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
@@ -1152,7 +1152,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout avo
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
|
||||
2
.github/workflows/stress.yml
vendored
2
.github/workflows/stress.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
|
||||
2
.github/workflows/thirdparty.yml
vendored
2
.github/workflows/thirdparty.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
check-latest: true
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
|
||||
|
||||
@@ -4,11 +4,10 @@ linters:
|
||||
enable-all: true
|
||||
disable:
|
||||
- cyclop
|
||||
- deadcode
|
||||
- dupword
|
||||
- err113
|
||||
- errname
|
||||
- exhaustruct
|
||||
- exhaustivestruct
|
||||
- forbidigo
|
||||
- forcetypeassert
|
||||
- funlen
|
||||
@@ -16,29 +15,22 @@ linters:
|
||||
- gochecknoinits
|
||||
- goconst
|
||||
- godox
|
||||
- goerr113
|
||||
- golint
|
||||
- gomnd
|
||||
- gosec
|
||||
- ifshort
|
||||
- iface
|
||||
- inamedparam
|
||||
- interfacer
|
||||
- ireturn
|
||||
- lll
|
||||
- maligned
|
||||
- mnd
|
||||
- nlreturn
|
||||
- nonamedreturns
|
||||
- nosnakecase
|
||||
- paralleltest
|
||||
- prealloc
|
||||
- perfsprint
|
||||
- prealloc
|
||||
- recvcheck
|
||||
- rowserrcheck
|
||||
- scopelint
|
||||
- structcheck
|
||||
- tagliatelle
|
||||
- testpackage
|
||||
- unparam
|
||||
- varcheck
|
||||
- varnamelen
|
||||
- wastedassign
|
||||
- wrapcheck
|
||||
|
||||
@@ -73,13 +73,13 @@ func (e ErrorList) Error() string {
|
||||
}
|
||||
|
||||
// LogError logs a list of errors, one error per line, if the err parameter is
|
||||
// an ErrorList. Otherwise it just logs the err string. Reports at most max
|
||||
// errors, or unlimited if max is 0.
|
||||
func LogError(l *log.Logger, err error, max int) {
|
||||
// an ErrorList. Otherwise it just logs the err string. Reports at most mx
|
||||
// errors, or unlimited if mx is 0.
|
||||
func LogError(l *log.Logger, err error, mx int) {
|
||||
var list ErrorList
|
||||
if errors.As(err, &list) {
|
||||
for i, e := range list {
|
||||
if max > 0 && i == max {
|
||||
if mx > 0 && i == mx {
|
||||
l.Print("too many errors")
|
||||
return
|
||||
}
|
||||
|
||||
6
go.mod
6
go.mod
@@ -6,11 +6,11 @@ toolchain go1.22.7
|
||||
|
||||
require (
|
||||
golang.org/x/arch v0.12.0
|
||||
golang.org/x/sys v0.27.0
|
||||
golang.org/x/tools v0.27.0
|
||||
golang.org/x/sys v0.28.0
|
||||
golang.org/x/tools v0.28.0
|
||||
)
|
||||
|
||||
require (
|
||||
golang.org/x/mod v0.22.0 // indirect
|
||||
golang.org/x/sync v0.9.0 // indirect
|
||||
golang.org/x/sync v0.10.0 // indirect
|
||||
)
|
||||
|
||||
12
go.sum
12
go.sum
@@ -4,9 +4,9 @@ golang.org/x/arch v0.12.0 h1:UsYJhbzPYGsT0HbEdmYcqtCv8UNGvnaL561NnIUvaKg=
|
||||
golang.org/x/arch v0.12.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
|
||||
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
|
||||
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
||||
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
|
||||
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
|
||||
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o=
|
||||
golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q=
|
||||
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
|
||||
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
|
||||
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8=
|
||||
golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw=
|
||||
|
||||
@@ -190,7 +190,7 @@ func (c *component) Field(n string) Component {
|
||||
// }
|
||||
//
|
||||
fields := make([]*types.Var, s.NumFields())
|
||||
for i := 0; i < s.NumFields(); i++ {
|
||||
for i := range s.NumFields() {
|
||||
fields[i] = s.Field(i)
|
||||
}
|
||||
offsets := Sizes.Offsetsof(fields)
|
||||
|
||||
@@ -192,7 +192,7 @@ func TestComponentDeconstruction(t *testing.T) {
|
||||
// For every test case, generate the same case but when the type is wrapped in
|
||||
// a named type.
|
||||
n := len(cases)
|
||||
for i := 0; i < n; i++ {
|
||||
for i := range n {
|
||||
wrapped := cases[i]
|
||||
wrapped.Name += "_wrapped"
|
||||
wrapped.Type = types.NewNamed(
|
||||
@@ -204,7 +204,6 @@ func TestComponentDeconstruction(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
c := c // avoid scopelint error
|
||||
t.Run(c.Name, func(t *testing.T) {
|
||||
t.Log(c.Type)
|
||||
base := operand.NewParamAddr("test", 0)
|
||||
|
||||
@@ -131,7 +131,7 @@ func newTuple(t *types.Tuple, offsets []int64, size int64, defaultprefix string)
|
||||
byname: map[string]Component{},
|
||||
size: int(size),
|
||||
}
|
||||
for i := 0; i < t.Len(); i++ {
|
||||
for i := range t.Len() {
|
||||
v := t.At(i)
|
||||
name := v.Name()
|
||||
if name == "" {
|
||||
@@ -172,7 +172,7 @@ func (t *Tuple) Bytes() int { return t.size }
|
||||
|
||||
func tuplevars(t *types.Tuple) []*types.Var {
|
||||
vs := make([]*types.Var, t.Len())
|
||||
for i := 0; i < t.Len(); i++ {
|
||||
for i := range t.Len() {
|
||||
vs[i] = t.At(i)
|
||||
}
|
||||
return vs
|
||||
|
||||
@@ -143,7 +143,7 @@ func TypesTuplesEqual(a, b *types.Tuple) bool {
|
||||
return false
|
||||
}
|
||||
n := a.Len()
|
||||
for i := 0; i < n; i++ {
|
||||
for i := range n {
|
||||
if !TypesVarsEqual(a.At(i), b.At(i)) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ func (f *Function) Signature() Signature {
|
||||
n := f.Arity()
|
||||
ops := make([]string, n)
|
||||
count := map[string]int{}
|
||||
for j := 0; j < n; j++ {
|
||||
for j := range n {
|
||||
// Collect unique lowercase bytes from first characters of operand types.
|
||||
s := map[byte]bool{}
|
||||
for _, form := range f.Forms {
|
||||
|
||||
@@ -12,7 +12,6 @@ func TestFunctionsDuplicateFormSignatures(t *testing.T) {
|
||||
// manifest as duplicate case statements in generated code.
|
||||
fns := InstructionsFunctions(inst.Instructions)
|
||||
for _, fn := range fns {
|
||||
fn := fn // scopelint
|
||||
t.Run(fn.Name(), func(t *testing.T) {
|
||||
seen := map[string]bool{}
|
||||
for _, f := range fn.Forms {
|
||||
@@ -36,7 +35,7 @@ func TestFunctionsUniqueArgNames(t *testing.T) {
|
||||
continue
|
||||
}
|
||||
names := map[string]bool{}
|
||||
for j := 0; j < n; j++ {
|
||||
for j := range n {
|
||||
names[s.ParameterName(j)] = true
|
||||
}
|
||||
if len(names) != n {
|
||||
|
||||
@@ -58,18 +58,18 @@ func (t *optab) Generate(is []inst.Instruction) ([]byte, error) {
|
||||
}
|
||||
|
||||
func (t *optab) maxOperands(is []inst.Instruction) {
|
||||
max := 0
|
||||
mx := 0
|
||||
for _, i := range inst.Instructions {
|
||||
for _, f := range i.Forms {
|
||||
a := len(f.Operands) + len(f.ImplicitOperands)
|
||||
if a > max {
|
||||
max = a
|
||||
if a > mx {
|
||||
mx = a
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
t.Comment("maxoperands is the maximum number of operands in an instruction form, including implicit operands.")
|
||||
t.Printf("const maxoperands = %d\n\n", max)
|
||||
t.Printf("const maxoperands = %d\n\n", mx)
|
||||
}
|
||||
|
||||
func (t *optab) operandTypeEnum(is []inst.Instruction) {
|
||||
@@ -109,17 +109,17 @@ func (t *optab) implicitRegisterEnum(is []inst.Instruction) {
|
||||
func (t *optab) suffixesType(is []inst.Instruction) {
|
||||
// Declare the type as an array. This requires us to know the maximum number
|
||||
// of suffixes an instruction can have.
|
||||
max := 0
|
||||
mx := 0
|
||||
for _, class := range inst.SuffixesClasses(is) {
|
||||
for _, suffixes := range class {
|
||||
if len(suffixes) > max {
|
||||
max = len(suffixes)
|
||||
if len(suffixes) > mx {
|
||||
mx = len(suffixes)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
t.Comment("maxsuffixes is the maximum number of suffixes an instruction can have.")
|
||||
t.Printf("const maxsuffixes = %d\n\n", max)
|
||||
t.Printf("const maxsuffixes = %d\n\n", mx)
|
||||
|
||||
name := t.table.SuffixesTypeName()
|
||||
t.Printf("type %s [maxsuffixes]%s\n", name, t.table.Suffix().Name())
|
||||
|
||||
@@ -44,7 +44,7 @@ func TestFormDupes(t *testing.T) {
|
||||
|
||||
func HasFormDupe(i inst.Instruction) bool {
|
||||
n := len(i.Forms)
|
||||
for a := 0; a < n; a++ {
|
||||
for a := range n {
|
||||
for b := a + 1; b < n; b++ {
|
||||
if reflect.DeepEqual(i.Forms[a], i.Forms[b]) {
|
||||
return true
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Frames returns at most max callstack Frames, starting with its caller and
|
||||
// Frames returns at most mx callstack Frames, starting with its caller and
|
||||
// skipping skip Frames.
|
||||
func Frames(skip, max int) []runtime.Frame {
|
||||
pc := make([]uintptr, max)
|
||||
func Frames(skip, mx int) []runtime.Frame {
|
||||
pc := make([]uintptr, mx)
|
||||
n := runtime.Callers(skip+2, pc)
|
||||
if n == 0 {
|
||||
return nil
|
||||
|
||||
@@ -25,6 +25,7 @@ func TestMatchFirst(t *testing.T) {
|
||||
first := stack.Match(0, func(_ runtime.Frame) bool { return true })
|
||||
if first == nil {
|
||||
t.Fatalf("nil match")
|
||||
return
|
||||
}
|
||||
got := first.Function
|
||||
expect := pkg + ".TestMatchFirst"
|
||||
|
||||
@@ -78,7 +78,7 @@ func TestAllocatorPriority(t *testing.T) {
|
||||
a.Add(x[i].ID())
|
||||
}
|
||||
|
||||
for i := 0; i < n; i++ {
|
||||
for i := range n {
|
||||
for j := i + 1; j < n; j++ {
|
||||
a.AddInterference(x[i].ID(), x[j].ID())
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ func CFG(fn *ir.Function) error {
|
||||
n := len(is)
|
||||
|
||||
// Populate successors.
|
||||
for i := 0; i < n; i++ {
|
||||
for i := range n {
|
||||
cur := is[i]
|
||||
var nxt *ir.Instruction
|
||||
if i+1 < n {
|
||||
|
||||
@@ -120,7 +120,7 @@ func TestAllocateRegistersBasePointerDeprioritized(t *testing.T) {
|
||||
ctx.SignatureExpr("func() uint64")
|
||||
|
||||
x := make([]reg.GPVirtual, n)
|
||||
for i := 0; i < n; i++ {
|
||||
for i := range n {
|
||||
x[i] = ctx.GP64()
|
||||
ctx.MOVQ(operand.U64(i), x[i])
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
go install ./internal/cmd/asmvet
|
||||
|
||||
# golangci-lint for linting
|
||||
golangci_lint_version='v1.55.2'
|
||||
golangci_lint_version='v1.62.2'
|
||||
golangci_install_script="https://raw.githubusercontent.com/golangci/golangci-lint/${golangci_lint_version}/install.sh"
|
||||
curl -sfL "${golangci_install_script}" | sh -s -- -b "$(go env GOPATH)/bin" "${golangci_lint_version}"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestZeroing(t *testing.T) {
|
||||
var got [8]uint64
|
||||
Zeroing(&got)
|
||||
|
||||
for i := 0; i < 8; i++ {
|
||||
for i := range 8 {
|
||||
if got[i] != expect {
|
||||
t.Errorf("got[%d] = %d; expect %d", i, got[i], expect)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
//go:generate go run asm.go -out issue387.s -stubs stub.go
|
||||
|
||||
func TestFloat32(t *testing.T) {
|
||||
for i := 0; i < 10; i++ {
|
||||
for i := range 10 {
|
||||
got := Float32(i)
|
||||
expect := float32(i)
|
||||
if got != expect {
|
||||
@@ -17,7 +17,7 @@ func TestFloat32(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFloat64(t *testing.T) {
|
||||
for i := 0; i < 10; i++ {
|
||||
for i := range 10 {
|
||||
got := Float64(i)
|
||||
expect := float64(i)
|
||||
if got != expect {
|
||||
|
||||
1
tests/thirdparty/config_test.go
vendored
1
tests/thirdparty/config_test.go
vendored
@@ -94,7 +94,6 @@ func TestValidateErrors(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, c := range cases {
|
||||
c := c // scopelint
|
||||
t.Run(c.Name, func(t *testing.T) {
|
||||
err := c.Item.Validate()
|
||||
if err == nil {
|
||||
|
||||
2
tests/thirdparty/make_workflow.go
vendored
2
tests/thirdparty/make_workflow.go
vendored
@@ -101,7 +101,7 @@ func GenerateWorkflow(s *thirdparty.Suite) ([]byte, error) {
|
||||
g.Linef("- name: Install Go")
|
||||
g.Linef(" uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1")
|
||||
g.Linef(" with:")
|
||||
g.Linef(" go-version: 1.22.x")
|
||||
g.Linef(" go-version: 1.23.x")
|
||||
g.Linef(" check-latest: true")
|
||||
|
||||
// Checkout avo.
|
||||
|
||||
1
tests/thirdparty/packages_test.go
vendored
1
tests/thirdparty/packages_test.go
vendored
@@ -34,7 +34,6 @@ func TestPackages(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tst := range s.Projects.Tests() {
|
||||
tst := tst // scopelint
|
||||
t.Run(tst.ID(), func(t *testing.T) {
|
||||
if tst.Project.Skip() {
|
||||
t.Skipf("skip: %s", tst.Project.Reason())
|
||||
|
||||
4
tests/thirdparty/suite.json
vendored
4
tests/thirdparty/suite.json
vendored
@@ -649,7 +649,7 @@
|
||||
"stars": 3031
|
||||
},
|
||||
"default_branch": "master",
|
||||
"version": "089bfa5675191fd96a44247682f76ebca03d7916",
|
||||
"version": "v0.24.0",
|
||||
"packages": [
|
||||
{
|
||||
"pkg": "curve25519",
|
||||
@@ -761,7 +761,7 @@
|
||||
"stars": 124357
|
||||
},
|
||||
"default_branch": "master",
|
||||
"version": "go1.20.1",
|
||||
"version": "go1.23.4",
|
||||
"packages": [
|
||||
{
|
||||
"pkg": "src/crypto/internal/bigmod",
|
||||
|
||||
@@ -78,7 +78,6 @@ func TestCases(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
c := c // scopelint
|
||||
t.Run(c.Name, func(t *testing.T) {
|
||||
if !reflect.DeepEqual(c.Instruction, c.Expect) {
|
||||
t.Logf(" got = %#v", c.Instruction)
|
||||
|
||||
Reference in New Issue
Block a user