Skip to content

Commit ef869ab

Browse files
committed
lint
1 parent 7d04dcf commit ef869ab

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

app/app.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ type App struct {
318318
MintKeeper mintkeeper.Keeper
319319
DistrKeeper distrkeeper.Keeper
320320
GovKeeper govkeeper.Keeper
321-
CrisisKeeper crisiskeeper.Keeper
321+
CrisisKeeper crisiskeeper.Keeper //nolint: staticcheck
322322
UpgradeKeeper *upgradekeeper.Keeper
323-
ParamsKeeper paramskeeper.Keeper
324-
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
323+
ParamsKeeper paramskeeper.Keeper //nolint: staticcheck
324+
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
325325
IBCFeeKeeper ibcfeekeeper.Keeper
326326
ICAControllerKeeper icacontrollerkeeper.Keeper
327327
ICAHostKeeper icahostkeeper.Keeper
@@ -586,7 +586,7 @@ func New(
586586
app.StakingKeeper,
587587
authAddr,
588588
)
589-
app.CrisisKeeper = *crisiskeeper.NewKeeper(
589+
app.CrisisKeeper = *crisiskeeper.NewKeeper( //nolint: staticcheck
590590
appCodec,
591591
runtime.NewKVStoreService(keys[crisistypes.StoreKey]),
592592
invCheckPeriod,
@@ -800,7 +800,7 @@ func New(
800800

801801
// NOTE: we may consider parsing `appOpts` inside module constructors. For the moment
802802
// we prefer to be more strict in what arguments the modules expect.
803-
skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants))
803+
skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) //nolint: staticcheck
804804

805805
// NOTE: Any module instantiated in the module manager that is later modified
806806
// must be passed by reference here.
@@ -815,7 +815,7 @@ func New(
815815
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
816816
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)),
817817
capability.NewAppModule(appCodec, *app.CapabilityKeeper, false),
818-
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
818+
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), //nolint: staticcheck
819819
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
820820
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)),
821821
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)),
@@ -832,7 +832,7 @@ func New(
832832
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)),
833833
upgrade.NewAppModule(app.UpgradeKeeper, app.AccountKeeper.AddressCodec()),
834834
evidence.NewAppModule(app.EvidenceKeeper),
835-
params.NewAppModule(app.ParamsKeeper),
835+
params.NewAppModule(app.ParamsKeeper), //nolint: staticcheck
836836
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
837837
protocolpool.NewAppModule(appCodec, app.PoolKeeper, app.AccountKeeper, app.BankKeeper),
838838

@@ -971,7 +971,7 @@ func New(
971971
// Uncomment if you want to set a custom migration order here.
972972
// app.mm.SetOrderMigrations(custom order)
973973

974-
app.ModuleManager.RegisterInvariants(&app.CrisisKeeper)
974+
app.ModuleManager.RegisterInvariants(&app.CrisisKeeper) //nolint: staticcheck
975975
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
976976
if err := app.ModuleManager.RegisterServices(app.configurator); err != nil {
977977
panic(err)
@@ -1433,8 +1433,8 @@ func GetMaccPerms() map[string][]string {
14331433
}
14341434

14351435
// initParamsKeeper init params keeper and its subspaces
1436-
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper {
1437-
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)
1436+
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { //nolint: staticcheck
1437+
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) //nolint: staticcheck
14381438

14391439
// SDK subspaces
14401440
paramsKeeper.Subspace(authtypes.ModuleName)

app/sim_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func TestFullAppSimulation(t *testing.T) {
9393
config := simcli.NewConfigFromFlags()
9494
config.ChainID = SimAppChainID
9595
config.BlockMaxGas = SimBlockMaxGas
96-
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
96+
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint: staticcheck
9797
if skip {
9898
t.Skip("skipping application simulation")
9999
}
@@ -135,7 +135,7 @@ func TestAppImportExport(t *testing.T) {
135135
config := simcli.NewConfigFromFlags()
136136
config.ChainID = SimAppChainID
137137
config.BlockMaxGas = SimBlockMaxGas
138-
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
138+
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint: staticcheck
139139
if skip {
140140
t.Skip("skipping application import/export simulation")
141141
}
@@ -179,7 +179,7 @@ func TestAppImportExport(t *testing.T) {
179179

180180
fmt.Printf("importing genesis...\n")
181181

182-
newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
182+
newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint: staticcheck
183183

184184
require.NoError(t, err, "simulation setup failed")
185185

@@ -229,7 +229,7 @@ func TestAppImportExport(t *testing.T) {
229229
stakingtypes.HistoricalInfoKey, stakingtypes.UnbondingIDKey, stakingtypes.UnbondingIndexKey, stakingtypes.UnbondingTypeKey, stakingtypes.ValidatorUpdatesKey,
230230
},
231231
}, // ordering may change but it doesn't matter
232-
{app.keys[slashingtypes.StoreKey], newApp.keys[slashingtypes.StoreKey], [][]byte{}},
232+
{app.keys[slashingtypes.StoreKey], newApp.keys[slashingtypes.StoreKey], [][]byte{slashingtypes.ValidatorMissedBlockBitmapKeyPrefix}},
233233
{app.keys[minttypes.StoreKey], newApp.keys[minttypes.StoreKey], [][]byte{}},
234234
{app.keys[distrtypes.StoreKey], newApp.keys[distrtypes.StoreKey], [][]byte{}},
235235
{app.keys[banktypes.StoreKey], newApp.keys[banktypes.StoreKey], [][]byte{banktypes.BalancesPrefix}},
@@ -260,7 +260,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
260260
config := simcli.NewConfigFromFlags()
261261
config.ChainID = SimAppChainID
262262
config.BlockMaxGas = SimBlockMaxGas
263-
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
263+
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint: staticcheck
264264

265265
if skip {
266266
t.Skip("skipping application simulation after import")
@@ -310,7 +310,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
310310

311311
fmt.Printf("importing genesis...\n")
312312

313-
newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
313+
newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint: staticcheck
314314
require.NoError(t, err, "simulation setup failed")
315315

316316
defer func() {
@@ -344,15 +344,15 @@ func TestAppSimulationAfterImport(t *testing.T) {
344344
// TODO: Make another test for the fuzzer itself, which just has noOp txs
345345
// and doesn't depend on the application.
346346
func TestAppStateDeterminism(t *testing.T) {
347-
if !simcli.FlagEnabledValue {
347+
if !simcli.FlagEnabledValue { //nolint: staticcheck
348348
t.Skip("skipping application simulation")
349349
}
350350

351351
config := simcli.NewConfigFromFlags()
352352
config.InitialBlockHeight = 1
353353
config.ExportParamsPath = ""
354-
config.OnOperation = false
355-
config.AllInvariants = false
354+
config.OnOperation = false //nolint: staticcheck
355+
config.AllInvariants = false //nolint: staticcheck
356356
config.ChainID = SimAppChainID
357357
config.BlockMaxGas = SimBlockMaxGas
358358

cmd/cronosd/cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func genesisCommand(txConfig client.TxConfig, basicManager module.BasicManager,
211211
}
212212

213213
func addModuleInitFlags(startCmd *cobra.Command) {
214-
crisis.AddModuleInitFlags(startCmd)
214+
crisis.AddModuleInitFlags(startCmd) //nolint: staticcheck
215215
cronos.AddModuleInitFlags(startCmd)
216216
// this line is used by starport scaffolding # stargate/root/initFlags
217217
}

0 commit comments

Comments
 (0)