feat: add lightclient
module and migrate block header state in this module
#3440
Annotations
6 errors and 4 warnings
Run golangci-lint
not enough arguments in call to initLightclientKeeper\n\thave (*\"github.com/cosmos/cosmos-sdk/codec\".ProtoCodec, *db.MemDB, \"github.com/cosmos/cosmos-sdk/store/types\".CommitMultiStore)\n\twant (\"github.com/cosmos/cosmos-sdk/codec\".Codec, *db.MemDB, \"github.com/cosmos/cosmos-sdk/store/types\".CommitMultiStore, \"github.com/zeta-chain/zetacore/x/lightclient/types\".AuthorityKeeper)","Severity":"","SourceLines":["package keeper"],"Replacement":null,"Pos":{"Filename":"testutil/keeper/authority.go","Offset":0,"Line":1,"Column":0},"ExpectNoLint":false,"ExpectedNoLintLinter":""},{"FromLinter":"revive","Text":"unused-parameter: parameter 'clientCtx' seems to be unused, consider removing or renaming it as _","Severity":"warning","SourceLines":["func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {"],"Replacement":null,"LineRange":{"From":76,"To":76},"Pos":{"Filename":"x/lightclient/module.go","Offset":2472,"Line":76,"Column":49},"ExpectNoLint":false,"ExpectedNoLintLinter":""},{"FromLinter":"revive","Text":"indent-error-flow: if block ends with a return statement, so drop this else and outdent its block","Severity":"warning","SourceLines":["\t} else {","\t\treturn fmt.Errorf(\"cannot verify inTx body for chain %d\", msg.ChainId)","\t}"],"Replacement":null,"LineRange":{"From":26,"To":28},"Pos":{"Filename":"x/crosschain/types/tx_body_verification.go","Offset":732,"Line":26,"Column":9},"ExpectNoLint":false,"ExpectedNoLintLinter":""}],"Report":{"Linters":[{"Name":"asasalint"},{"Name":"asciicheck"},{"Name":"bidichk"},{"Name":"bodyclose","Enabled":true},{"Name":"containedctx"},{"Name":"contextcheck"},{"Name":"cyclop"},{"Name":"decorder"},{"Name":"deadcode"},{"Name":"depguard"},{"Name":"dogsled","Enabled":true},{"Name":"dupl"},{"Name":"dupword"},{"Name":"durationcheck"},{"Name":"errcheck","Enabled":true,"EnabledByDefault":true},{"Name":"errchkjson"},{"Name":"errname"},{"Name":"errorlint"},{"Name":"execinquery"},{"Name":"exhaustive"},{"Name":"exhaustivestruct"},{"Name":"exhaustruct"},{"Name":"exportloopref"},{"Name":"forbidigo"},{"Name":"forcetypeassert"},{"Name":"funlen"},{"Name":"gci"},{"Name":"ginkgolinter"},{"Name":"gocheckcompilerdirectives"},{"Name":"gochecknoglobals"},{"Name":"gochecknoinits"},{"Name":"gocognit"},{"Name":"goconst","Enabled":true},{"Name":"gocritic"},{"Name":"gocyclo"},{"Name":"godot"},{"Name":"godox"},{"Name":"goerr113"},{"Name":"gofmt"},{"Name":"gofumpt"},{"Name":"goheader"},{"Name":"goimports","Enabled":true},{"Name":"golint"},{"Name":"gomnd"},{"Name":"gomoddirectives"},{"Name":"gomodguard"},{"Name":"goprintffuncname"},{"Name":"gosec","Enabled":true},{"Name":"gosimple","EnabledByDefault":true},{"Name":"gosmopolitan"},{"Name":"govet","Enabled":true,"EnabledByDefault":true},{"Name":"grouper"},{"Name":"ifshort"},{"Name":"importas"},{"Name":"ineffassign","Enabled":true,"EnabledByDefault":true},{"Name":"interfacebloat"},{"Name":"interfacer"},{"Name":"ireturn"},{"Name":"lll"},{"Name":"loggercheck"},{"Name":"maintidx"},{"Name":"makezero"},{"Name":"maligned"},{"Name":"mirror"},{"Name":"misspell","Enabled":true},{"Name":"musttag"},{"Name":"nakedret"},{"Name":"nestif"},{"Name":"nilerr"},{"Name":"nilnil"},{"Name":"nlreturn"},{"Name":"noctx"},{"Name":"nonamedreturns"},{"Name":"nosnakecase"},{"Name":"nosprintfhostport"},{"Name":"paralleltest"},{"Name":"prealloc","Enabled":true},{"Name":"predeclared"},{"Name":"promlinter"},{"Name":"reassign"},{"Name":"revive","Enabled":true},{"Name":"rowserrcheck"},{"Name":"scopelint"},{"Name":"sqlclosecheck"},{"Name":"staticcheck","EnabledByDefault":true},{"Name":"structcheck"},{"Name":"stylecheck","Enabled":true},{"Name":"tagalign"},{"Name":"tagliatelle"},{"Name":"tenv"},{"Name":"testableexamples"},{"Name":"testpackage"},{"Name":"thelper"},{"Name":"tparallel"},{"Name":"typecheck","Enabled":true,"EnabledByDefault":true},{"Name":"unconvert","Enabled":true},{"Name":"unparam"},{"Name":"unused","Enabled":true,"EnabledByDefault":true},{"Name":"usestdlibvars"},{"Name":"varcheck"},{"Name":"varnamelen"},{"Name":"wastedassign"},{"Name":"whitespace"},
|
Run golangci-lint:
testutil/keeper/authority.go#L1
: # github.com/zeta-chain/zetacore/testutil/keeper
|
Run golangci-lint:
testutil/keeper/crosschain.go#L67
not enough arguments in call to initLightclientKeeper
|
Run golangci-lint:
testutil/keeper/emissions.go#L53
not enough arguments in call to initLightclientKeeper
|
Run golangci-lint:
testutil/keeper/fungible.go#L96
not enough arguments in call to initLightclientKeeper
|
Run golangci-lint
issues found
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions/setup-go@v3, golangci/golangci-lint-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Run golangci-lint:
x/lightclient/module.go#L76
unused-parameter: parameter 'clientCtx' seems to be unused, consider removing or renaming it as _ (revive)
|
Run golangci-lint:
x/crosschain/types/tx_body_verification.go#L26
indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
|
Loading