From 6de735cd35e35a25c1b2a4a1c418b0f75c21344e Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 25 Nov 2024 11:36:36 +0800 Subject: [PATCH] fix g115 overflow lint error --- infrastructure/tendermint/parser.go | 2 +- projection/validator/view/validators.go | 2 +- usecase/parser/gov/v1/msg.go | 2 +- usecase/parser/v0_42_7/ibcmsg/ibcmsg.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/infrastructure/tendermint/parser.go b/infrastructure/tendermint/parser.go index 9991c214..b3a3650b 100644 --- a/infrastructure/tendermint/parser.go +++ b/infrastructure/tendermint/parser.go @@ -133,7 +133,7 @@ func ParseBlockResultsResp(rawRespReader io.Reader, eventAttributeDecoder tender txsResults := parseBlockResultsTxsResults(rawBlockResults.TxsResults, eventAttributeDecoder) return &model.BlockResults{ - // disable G115 + //nolint:gosec Height: int64(height), TxsResults: txsResults, BeginBlockEvents: beginBlockEvents, diff --git a/projection/validator/view/validators.go b/projection/validator/view/validators.go index 979aa978..3cbff4d1 100644 --- a/projection/validator/view/validators.go +++ b/projection/validator/view/validators.go @@ -706,7 +706,7 @@ func (validatorsView *ValidatorsView) List( ).From( VALIDATORS_TABLE_NAME, ).Offset(0).Limit( - // disable G115 + //nolint:gosec uint64(pagination.OffsetParams().Offset()), ) cumulativePowerStmtBuilder = cumulativePowerStmtBuilder.OrderBy(orderClauses...) diff --git a/usecase/parser/gov/v1/msg.go b/usecase/parser/gov/v1/msg.go index e74eab39..d22a9b65 100644 --- a/usecase/parser/gov/v1/msg.go +++ b/usecase/parser/gov/v1/msg.go @@ -132,7 +132,7 @@ func ParseMsgSubmitProposal( "/cosmos.consensus.v1.MsgUpdateParams": break default: - // disable G115 + //nolint:gosec parser := parserParams.ParserManager.GetParser(utils.CosmosParserKey(innerMsgType), utils.ParserBlockHeight(blockHeight)) msgCommands, signers := parser(utils.CosmosParserParams{ diff --git a/usecase/parser/v0_42_7/ibcmsg/ibcmsg.go b/usecase/parser/v0_42_7/ibcmsg/ibcmsg.go index be38a7c4..5d4d0e4d 100644 --- a/usecase/parser/v0_42_7/ibcmsg/ibcmsg.go +++ b/usecase/parser/v0_42_7/ibcmsg/ibcmsg.go @@ -388,7 +388,7 @@ func ParseMsgSubmitTx( // https://github.com/crypto-com/chain-indexing/issues/673 continue default: - // disable G115 + //nolint:gosec parser := parserParams.ParserManager.GetParser(utils.CosmosParserKey(message.Type), utils.ParserBlockHeight(parserParams.MsgCommonParams.BlockHeight)) innerMsgs[msgIndex]["msg_index"] = strconv.Itoa(msgIndex) msgCommands, signers := parser(utils.CosmosParserParams{