Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed Feb 17, 2025
1 parent bc6cb77 commit f86e59c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
22 changes: 10 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ run:
go: '1.22'
timeout: 20m
tests: true
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true
skip-dirs:
- slashing
- gov
- params
skip-files:
- gen_.*.go
- .*_gen.go

linters:
enable:
Expand All @@ -29,7 +19,6 @@ linters:
- errchkjson
- errname
# - exhaustive
- exportloopref
# - gocognit
- gofmt
# - gomnd
Expand Down Expand Up @@ -129,7 +118,6 @@ linters-settings:
- fieldalignment
- shadow
- unsafeptr
check-shadowing: true
enable-all: true
settings:
printf:
Expand All @@ -143,6 +131,16 @@ linters-settings:
- (github.com/ethereum/go-ethereum/log.Logger).Crit

issues:
exclude-dirs:
- slashing
- gov
- params
exclude-files:
- gen_.*.go
- .*_gen.go
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
exclude-dirs-use-default: true
exclude-rules:
# Exclude some linters from running on tests files.
- path: test\.go
Expand Down
2 changes: 1 addition & 1 deletion bor/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ func (k *Keeper) getBorBlockForSpanSeed(ctx sdk.Context, seedSpan *hmTypes.Span,
break
}

author, err := k.GetSeedProducer(ctx, spanID)
author, err = k.GetSeedProducer(ctx, spanID)
if err != nil {
logger.Error("Error fetching span seed producer", "error", err, "span id", spanID)
return 0, nil, err
Expand Down
6 changes: 3 additions & 3 deletions bridge/setu/processor/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ func (sp *SpanProcessor) checkAndPropose() {
}

if nodeStatus.SyncInfo.LatestBlockHeight >= helper.GetDanelawHeight() {
latestBlock, err := sp.contractConnector.GetMaticChainBlock(nil)
if err != nil {
sp.Logger.Error("Error fetching current child block", "error", err)
latestBlock, e := sp.contractConnector.GetMaticChainBlock(nil)
if e != nil {
sp.Logger.Error("Error fetching current child block", "error", e)
return
}

Expand Down

0 comments on commit f86e59c

Please sign in to comment.