diff --git a/.golangci.yml b/.golangci.yml index 03eff284ce6..3935184b3a1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,6 +2,8 @@ run: tests: false skip-dirs: - tests/e2e + timeout: 5m + linters: disable-all: true @@ -10,21 +12,20 @@ linters: - deadcode - depguard - dogsled - # - errcheck + - errcheck + - exportloopref - goconst - gocritic - gofmt - goimports - - golint - gosec - gosimple - govet - ineffassign - - interfacer - - maligned - misspell - nakedret - prealloc + - revive - scopelint - staticcheck - structcheck @@ -33,8 +34,6 @@ linters: - unconvert - unused - unparam - # - wsl - - nolintlint issues: exclude-rules: diff --git a/app/app.go b/app/app.go index 26714a6e8ae..24ff0a8fd6f 100644 --- a/app/app.go +++ b/app/app.go @@ -187,7 +187,7 @@ var ( // GaiaApp extends an ABCI application, but with most of its parameters exported. // They are exported for convenience in creating helper functions, as object // capabilities aren't needed for testing. -type GaiaApp struct { // nolint: golint +type GaiaApp struct { // nolint: revive *baseapp.BaseApp legacyAmino *codec.LegacyAmino appCodec codec.Codec diff --git a/app/export.go b/app/export.go index 0c000cdf31e..d7d26d6c437 100644 --- a/app/export.go +++ b/app/export.go @@ -109,7 +109,10 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) app.DistrKeeper.SetFeePool(ctx, feePool) - app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) + err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) + if err != nil { + log.Fatal(err) + } return false }) @@ -123,8 +126,15 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ if err != nil { panic(err) } - app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) - app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) + err = app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) + if err != nil { + panic(err) + } + err = app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) + if err != nil { + panic(err) + } + } // reset context height