Skip to content

Commit 49fd43e

Browse files
bump golangci-lint to v1.64.8 (#769)
- bump golangci-lint to last v1 version We can upgrade to v2 later. - switch to copyloopvar linter and remove violations Since we're above Go 1.22, we can remove all the `tt := tt` occurrences. --------- Signed-off-by: Spencer Schrock <[email protected]> Co-authored-by: Stephen Augustus <[email protected]>
1 parent d67807b commit 49fd43e

File tree

5 files changed

+2
-10
lines changed

5 files changed

+2
-10
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ on:
2828
env:
2929
PROTOC_VERSION: 3.17.3
3030
GO_VERSION: 1.23
31-
GOLANGCI_LINT_VERSION: v1.63
31+
GOLANGCI_LINT_VERSION: v1.64.8
3232

3333
jobs:
3434
build-scorecard-webapp:

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ linters:
2222
disable-all: true
2323
enable:
2424
- asciicheck
25+
- copyloopvar
2526
- dogsled
2627
- exhaustive
27-
- exportloopref
2828
- gci
2929
- gochecknoinits
3030
- goconst

app/server/get_results_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ func TestSanitizePath(t *testing.T) {
7171
},
7272
}
7373
for _, tt := range testcases {
74-
tt := tt
7574
t.Run(tt.name, func(t *testing.T) {
7675
t.Parallel()
7776
gotPath, gotErr := sanitizeInputs(tt.host, tt.orgName, tt.repoName, tt.commit)

app/server/internal/hashedrekord/hashedrekord_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ func Test_Body_certs(t *testing.T) {
5353
},
5454
}
5555
for _, tt := range tests {
56-
tt := tt
5756
t.Run(tt.name, func(t *testing.T) {
5857
t.Parallel()
5958
certs, err := tt.body.Certs()
@@ -122,7 +121,6 @@ func Test_Body_Matches(t *testing.T) {
122121
},
123122
}
124123
for _, tt := range tests {
125-
tt := tt
126124
t.Run(tt.name, func(t *testing.T) {
127125
t.Parallel()
128126
b, err := os.ReadFile(tt.blobPath)

app/server/post_results_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ func Test_extractCertInfo(t *testing.T) {
177177
},
178178
}
179179
for _, tt := range tests {
180-
tt := tt
181180
t.Run(tt.name, func(t *testing.T) {
182181
t.Parallel()
183182
got, err := extractCertInfo(tt.args.cert)
@@ -253,7 +252,6 @@ func Test_splitFullPath(t *testing.T) {
253252
},
254253
}
255254
for _, tt := range tests {
256-
tt := tt
257255
t.Run(tt.name, func(t *testing.T) {
258256
t.Parallel()
259257
o, r, p, ok := splitFullPath(tt.path)
@@ -300,7 +298,6 @@ MYSKu39B6Q==
300298
-----END CERTIFICATE-----`), false, false},
301299
}
302300
for i, tt := range tests {
303-
tt := tt
304301
t.Run(fmt.Sprintf("%d", i), func(t *testing.T) {
305302
t.Parallel()
306303
got, err := getCertPool(tt.cert)
@@ -342,7 +339,6 @@ func Test_getTLogEntryFromURL(t *testing.T) {
342339
}
343340
ctx := context.Background()
344341
for _, tt := range tests {
345-
tt := tt
346342
t.Run(tt.name, func(t *testing.T) {
347343
t.Parallel()
348344
url := setupServer(t) + tt.responsePath
@@ -417,7 +413,6 @@ func Test_tlogEntry_rekord(t *testing.T) {
417413
},
418414
}
419415
for _, tt := range tests {
420-
tt := tt
421416
t.Run(tt.name, func(t *testing.T) {
422417
t.Parallel()
423418
r, err := tt.entry.rekord()

0 commit comments

Comments
 (0)