Skip to content

Commit 45c672d

Browse files
authored
Merge pull request #440 from tri-adam/golangci-lint-2.8
chore: bump golangci-lint to v2.8
2 parents 5e80e73 + dac0e14 commit 45c672d

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ executors:
99
- image: node:22-slim
1010
golangci-lint:
1111
docker:
12-
- image: golangci/golangci-lint:v2.4
12+
- image: golangci/golangci-lint:v2.8
1313
golang-previous:
1414
docker:
1515
- image: golang:1.24

pkg/integrity/sign_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020-2025, Sylabs Inc. All rights reserved.
1+
// Copyright (c) 2020-2026, Sylabs Inc. All rights reserved.
22
// This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file
33
// distributed with the sources of this project regarding your rights to use or distribute this
44
// software.
@@ -77,7 +77,7 @@ func TestOptSignGroupObjects(t *testing.T) {
7777
}
7878

7979
if err == nil {
80-
var got []uint32
80+
got := make([]uint32, 0, len(gs.ods))
8181
for _, od := range gs.ods {
8282
got = append(got, od.ID())
8383
}
@@ -557,7 +557,7 @@ func TestNewSigner(t *testing.T) {
557557
if want, ok := tt.wantGroupObjects[groupID]; !ok {
558558
t.Errorf("unexpected signer for group ID %v", groupID)
559559
} else {
560-
var got []uint32
560+
got := make([]uint32, 0, len(signer.ods))
561561
for _, od := range signer.ods {
562562
got = append(got, od.ID())
563563
}

pkg/integrity/verify_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020-2025, Sylabs Inc. All rights reserved.
1+
// Copyright (c) 2020-2026, Sylabs Inc. All rights reserved.
22
// This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file
33
// distributed with the sources of this project regarding your rights to use or distribute this
44
// software.
@@ -729,7 +729,8 @@ func getSignedDummy(t *testing.T, fps ...[]byte) *sif.FileImage {
729729
t.Fatal(err)
730730
}
731731

732-
dis := []sif.DescriptorInput{di}
732+
dis := make([]sif.DescriptorInput, 0, 1+len(fps))
733+
dis = append(dis, di)
733734

734735
for _, fp := range fps {
735736
di, err := sif.NewDescriptorInput(sif.DataSignature, strings.NewReader("sig"),

pkg/siftool/add_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021-2023, Sylabs Inc. All rights reserved.
1+
// Copyright (c) 2021-2026, Sylabs Inc. All rights reserved.
22
// This software is licensed under a 3-clause BSD license. Please consult the
33
// LICENSE file distributed with the sources of this project regarding your
44
// rights to use or distribute this software.
@@ -52,10 +52,11 @@ func Test_command_getAdd(t *testing.T) {
5252

5353
cmd := c.getAdd()
5454

55-
args := []string{
55+
args := make([]string, 0, 2+len(tt.flags))
56+
args = append(args,
5657
makeTestSIF(t, false),
5758
filepath.Join("testdata", "input", "input.bin"),
58-
}
59+
)
5960
args = append(args, tt.flags...)
6061

6162
runCommand(t, cmd, args, nil)

0 commit comments

Comments
 (0)