Skip to content

Commit 9ec10dc

Browse files
committed
update golangci-lint
1 parent 4bf1c08 commit 9ec10dc

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ jobs:
7373
- name: golangci-lint
7474
uses: golangci/golangci-lint-action@v8
7575
with:
76-
version: latest
76+
version: v2.6.0

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ linters:
2121
- copyloopvar
2222
- tparallel
2323
- gochecknoglobals
24+
- nolintlint
25+
- modernize
2426
settings:
2527
govet:
2628
enable:

internal/nodes/nodebasics_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ func TestLeafNode_CloneLeaf(t *testing.T) {
737737

738738
if cloned == nil {
739739
t.Fatal("CloneLeaf should return non-nil for non-nil receiver")
740+
return // redundant, but staticcheck is otherweise confused
740741
}
741742
if cloned.Prefix != pfx {
742743
t.Error("CloneLeaf should preserve Prefix")
@@ -766,6 +767,7 @@ func TestLeafNode_CloneLeaf(t *testing.T) {
766767

767768
if cloned == nil {
768769
t.Fatal("CloneLeaf should return non-nil")
770+
return // redundant, but staticcheck is otherweise confused
769771
}
770772
if cloned.Prefix != pfx {
771773
t.Error("CloneLeaf should preserve Prefix")
@@ -797,6 +799,7 @@ func TestFringeNode_CloneFringe(t *testing.T) {
797799

798800
if cloned == nil {
799801
t.Fatal("CloneFringe should return non-nil for non-nil receiver")
802+
return // redundant, but staticcheck is otherweise confused
800803
}
801804
if cloned.Value != 42 {
802805
t.Error("CloneFringe should preserve Value with nil cloneFn")
@@ -822,6 +825,7 @@ func TestFringeNode_CloneFringe(t *testing.T) {
822825

823826
if cloned == nil {
824827
t.Fatal("CloneFringe should return non-nil")
828+
return // redundant, but staticcheck is otherweise confused
825829
}
826830
if cloned.Value.Str != "hello_cloned" {
827831
t.Errorf("CloneFringe should apply cloneFn, got %q, want %q", cloned.Value.Str, "hello_cloned")

internal/value/value_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ func TestCloneVal_TypedNil(t *testing.T) {
330330

331331
t.Run("interface_with_typed_nil", func(t *testing.T) {
332332
t.Parallel()
333-
var i interface{} = (*int)(nil)
333+
var i any = (*int)(nil)
334334
cloned := CloneVal(i)
335335

336336
if cloned != i {
@@ -434,7 +434,7 @@ func TestCopyVal_TypedNil(t *testing.T) {
434434

435435
t.Run("interface_with_typed_nil", func(t *testing.T) {
436436
t.Parallel()
437-
var i interface{} = (*int)(nil)
437+
var i any = (*int)(nil)
438438
copied := CopyVal(i)
439439

440440
// CopyVal is a value copy, so interface contents are copied

0 commit comments

Comments
 (0)