celestiaorg / celestia-app

Celestia consensus node
https://celestiaorg.github.io/celestia-app/
Apache License 2.0
345 stars 292 forks source link

non-constant format string in call to cosmossdk.io/errors.Wrapf #3919

Closed rootulp closed 1 month ago

rootulp commented 1 month ago

Problem

On v2.x

$ make lint
--> Running golangci-lint
WARN The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar.
x/blobstream/keeper/keeper_data_commitment.go:112:78: printf: non-constant format string in call to cosmossdk.io/errors.Wrapf (govet)
            return types.DataCommitment{}, errors.Wrapf(types.ErrAttestationNotFound, fmt.Sprintf("nonce %d", i))
                                                                                      ^
x/blobstream/keeper/keeper_data_commitment.go:139:61: printf: non-constant format string in call to cosmossdk.io/errors.Wrapf (govet)
            return false, errors.Wrapf(types.ErrAttestationNotFound, fmt.Sprintf("nonce %d", i))

Proposal

Address the lint complaints

kobakaku commented 1 month ago

I've done this issue. https://github.com/celestiaorg/celestia-app/pull/3924