Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v15] chore: Bump golangci-lint to v1.63.4 #50868

Merged
merged 5 commits into from
Jan 8, 2025
Merged
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
12 changes: 9 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@ issues:
- linters: [testifylint]
text: "suite-thelper: suite helper method must start with"
path: 'integrations/.+'
# Go 1.22 related warnings.
# These are OK because our toolchain is 1.22 or newer.
- linters: [govet]
text: "stdversion: cmp.Or requires go1.22 or later"
- linters: [govet]
text: "stdversion: rand.New requires go1.22 or later"
- linters: [govet]
text: "stdversion: rand.NewPCG requires go1.22 or later"

exclude-use-default: true
max-same-issues: 0
max-issues-per-linter: 0
uniq-by-line: false

linters:
disable-all: true
Expand Down Expand Up @@ -147,9 +156,6 @@ linters-settings:
- suite-extra-assert-call
- suite-thelper

output:
uniq-by-line: false

run:
go: '1.21'
build-tags: []
Expand Down
2 changes: 1 addition & 1 deletion build.assets/versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Sync with devbox.json.
GOLANG_VERSION ?= go1.22.10
GOLANGCI_LINT_VERSION ?= v1.61.0
GOLANGCI_LINT_VERSION ?= v1.63.4

NODE_VERSION ?= 20.18.0

Expand Down
2 changes: 1 addition & 1 deletion e
Submodule e updated from f48078 to 4d9ada
1 change: 1 addition & 0 deletions lib/devicetrust/assert/assert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func TestCeremony(t *testing.T) {
},
}
for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 2 additions & 0 deletions lib/events/export/date_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
func TestDateExporterBasics(t *testing.T) {
t.Parallel()
for _, randomFlake := range []bool{false, true} {
randomFlake := randomFlake
t.Run(fmt.Sprintf("randomFlake=%v", randomFlake), func(t *testing.T) {
t.Parallel()
testDateExporterBasics(t, randomFlake)
Expand Down Expand Up @@ -197,6 +198,7 @@ func testDateExporterBasics(t *testing.T, randomFlake bool) {
func TestDateExporterResume(t *testing.T) {
t.Parallel()
for _, randomFlake := range []bool{false, true} {
randomFlake := randomFlake
t.Run(fmt.Sprintf("randomFlake=%v", randomFlake), func(t *testing.T) {
t.Parallel()
testDateExporterResume(t, randomFlake)
Expand Down
1 change: 1 addition & 0 deletions lib/events/export/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func TestExporterBasics(t *testing.T) {
startDate := now.Add(-7 * day)

for _, randomFlake := range []bool{false, true} {
randomFlake := randomFlake

// empty case verified export of a time range larger than backlog size with no events in it.
t.Run(fmt.Sprintf("case=empty,randomFlake=%v", randomFlake), func(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions lib/integrations/awsoidc/eks_enroll_clusters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TestEnrollEKSClusters(t *testing.T) {
responseCheck: func(t *testing.T, response *EnrollEKSClusterResponse) {
require.Len(t, response.Results, 1)
require.Equal(t, "EKS1", response.Results[0].ClusterName)
require.Empty(t, response.Results[0].Error)
require.NoError(t, response.Results[0].Error)
require.NotEmpty(t, response.Results[0].ResourceId)
},
},
Expand All @@ -186,10 +186,10 @@ func TestEnrollEKSClusters(t *testing.T) {
return strings.Compare(a.ClusterName, b.ClusterName)
})
require.Equal(t, "EKS1", response.Results[0].ClusterName)
require.Empty(t, response.Results[0].Error)
require.NoError(t, response.Results[0].Error)
require.NotEmpty(t, response.Results[0].ResourceId)
require.Equal(t, "EKS2", response.Results[1].ClusterName)
require.Empty(t, response.Results[1].Error)
require.NoError(t, response.Results[1].Error)
require.NotEmpty(t, response.Results[1].ResourceId)
},
},
Expand Down
2 changes: 1 addition & 1 deletion lib/services/local/access_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ func TestAccessListReviewCRUD(t *testing.T) {

// Verify that access lists reviews are gone.
_, _, err = service.ListAccessListReviews(ctx, accessList1.GetName(), 0, "")
require.Empty(t, err)
require.NoError(t, err)
}

func TestAccessListRequiresEqual(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion lib/services/role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ func TestValidateRole(t *testing.T) {
require.NoError(t, err, trace.DebugReport(err))

if len(tc.expectWarnings) == 0 {
require.Empty(t, warning)
require.NoError(t, warning)
}
for _, msg := range tc.expectWarnings {
require.ErrorContains(t, warning, msg)
Expand Down
1 change: 1 addition & 0 deletions tool/tsh/common/tsh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6319,6 +6319,7 @@ func TestInteractiveCompatibilityFlags(t *testing.T) {
require.NoError(t, err)

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
err := exec.Command(tshBin, "ssh", tt.flag, hostname, tty).Run()
Expand Down
Loading