Skip to content

Commit 3490df5

Browse files
committed
update golangci-lint
1 parent d39553b commit 3490df5

5 files changed

Lines changed: 12 additions & 21 deletions

File tree

.github/workflows/_shared-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: golangci/golangci-lint-action@v3
3737
with:
3838
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
39-
version: v1.56.1
39+
version: v1.59.1
4040

4141
# Optional: working directory, useful for monorepos
4242
# working-directory: somedir

.golangci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ linters-settings:
1212
- performance
1313
- style
1414
govet:
15-
check-shadowing: true
15+
enable:
16+
- shadow
1617
nolintlint:
1718
require-explanation: true
1819
require-specific: true
@@ -21,7 +22,6 @@ linters:
2122
disable-all: true
2223
enable:
2324
- bodyclose
24-
- deadcode
2525
- dogsled
2626
- dupl
2727
- errcheck
@@ -42,14 +42,13 @@ linters:
4242
- prealloc
4343
- revive
4444
- staticcheck
45-
- structcheck
4645
- stylecheck
4746
- thelper
4847
- tparallel
4948
- typecheck
5049
- unconvert
5150
- unparam
52-
- varcheck
51+
- unused
5352
- whitespace
5453
- wsl
5554

pkg/coordinator/clients/consensus/subscriptions.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@ package consensus
33
import "sync"
44

55
type Subscription[T interface{}] struct {
6-
//nolint:structcheck // linter bug with generic struct
7-
channel chan T
8-
//nolint:structcheck // linter bug with generic struct
6+
channel chan T
97
dispatcher *Dispatcher[T]
108
}
119

1210
type Dispatcher[T interface{}] struct {
13-
//nolint:structcheck // linter bug with generic struct
14-
mutex sync.Mutex
15-
//nolint:structcheck // linter bug with generic struct
11+
mutex sync.Mutex
1612
subscriptions []*Subscription[T]
1713
}
1814

pkg/coordinator/clients/execution/subscriptions.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@ package execution
33
import "sync"
44

55
type Subscription[T interface{}] struct {
6-
//nolint:structcheck // linter bug with generic struct
7-
channel chan T
8-
//nolint:structcheck // linter bug with generic struct
6+
channel chan T
97
dispatcher *Dispatcher[T]
108
}
119

1210
type Dispatcher[T interface{}] struct {
13-
//nolint:structcheck // linter bug with generic struct
14-
mutex sync.Mutex
15-
//nolint:structcheck // linter bug with generic struct
11+
mutex sync.Mutex
1612
subscriptions []*Subscription[T]
1713
}
1814

pkg/coordinator/wallet/blobtx/blob_encode.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ func encodeBlobData(data []byte) kzg4844.Blob {
2626
break
2727
}
2828

29-
max := i + 31
30-
if max > len(data) {
31-
max = len(data)
29+
maxpos := i + 31
30+
if maxpos > len(data) {
31+
maxpos = len(data)
3232
}
3333

34-
copy(blob[fieldIndex*32+1:], data[i:max])
34+
copy(blob[fieldIndex*32+1:], data[i:maxpos])
3535
}
3636

3737
return blob

0 commit comments

Comments
 (0)