Skip to content

Commit

Permalink
chore(lint): bump golang-ci lint to 1.60 (#3678)
Browse files Browse the repository at this point in the history
  • Loading branch information
walldiss authored Aug 23, 2024
1 parent 87e2802 commit 5ffa175
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: golangci/[email protected]
with:
args: --timeout 10m
version: v1.59
version: v1.60
skip-cache: true

lint-imports:
Expand Down
6 changes: 4 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ linters:
# - funlen
# - gochecknoglobals
# - gochecknoinits
- exportloopref
- copyloopvar
- gocheckcompilerdirectives
- goconst
- gocritic
Expand All @@ -40,7 +40,6 @@ linters:
- prealloc
- protogetter
# - scopelint - deprecated since v1.39. exportloopref will be used instead
- exportloopref
- staticcheck
- stylecheck
- typecheck
Expand Down Expand Up @@ -68,6 +67,9 @@ issues:
max-same-issues: 50

linters-settings:
gosec:
excludes:
- G115 # integer overflow conversion
dogsled:
max-blank-identifiers: 3
golint:
Expand Down
1 change: 0 additions & 1 deletion core/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func (ce *Exchange) getRangeByHeight(ctx context.Context, from, amount uint64) (
errGroup, ctx := errgroup.WithContext(ctx)
errGroup.SetLimit(concurrencyLimit)
for i := range headers {
i := i
errGroup.Go(func() error {
extHeader, err := ce.GetByHeight(ctx, from+uint64(i))
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions nodebuilder/rpc/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ func TestParseFlags(t *testing.T) {

err := cmd.Flags().Set(addrFlag, test.addrFlag)
if err != nil {
t.Errorf(err.Error())
t.Errorf("error setting addrFlag: %s", err)
}
err = cmd.Flags().Set(portFlag, test.portFlag)
if err != nil {
t.Errorf(err.Error())
t.Errorf("error setting portFlag: %s", err)
}

ParseFlags(cmd, cfg)
Expand Down
1 change: 0 additions & 1 deletion share/eds/retriever_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func TestRetriever_Retrieve(t *testing.T) {
{"128x128(max)", share.MaxSquareSize},
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
// generate EDS
shares := sharetest.RandShares(t, tc.squareSize*tc.squareSize)
Expand Down
2 changes: 0 additions & 2 deletions share/eds/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ func CollectSharesByNamespace(
errGroup, ctx := errgroup.WithContext(ctx)
shares = make([]share.NamespacedRow, len(rootCIDs))
for i, rootCID := range rootCIDs {
// shadow loop variables, to ensure correct values are captured
i, rootCID := i, rootCID
errGroup.Go(func() error {
row, proof, err := ipld.GetSharesByNamespace(ctx, bg, rootCID, namespace, len(root.RowRoots))
shares[i] = share.NamespacedRow{
Expand Down
1 change: 0 additions & 1 deletion share/getters/getter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ func BenchmarkIPLDGetterOverBusyCache(b *testing.B) {
g := sync.WaitGroup{}
g.Add(blocks)
for _, h := range headers {
h := h
go func() {
defer g.Done()
_, err := getter.GetEDS(ctx, h)
Expand Down
2 changes: 0 additions & 2 deletions share/ipld/get_shares_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ func TestBlockRecovery(t *testing.T) {
{"missing all but one shares", allShares, true, "failed to solve data square", extendedShareCount - 1},
}
for _, tc := range testCases {
tc := tc

t.Run(tc.name, func(t *testing.T) {
squareSize := utils.SquareSize(len(tc.shares))

Expand Down

0 comments on commit 5ffa175

Please sign in to comment.