From f5029a018730ee35e98255dfd2d5ae4bcfd3598d Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 25 Mar 2021 17:17:46 -0700 Subject: [PATCH] lint: don't skip builtin --- .golangci.yml | 6 ++++++ chain/actors/builtin/builtin.go | 2 +- chain/actors/builtin/multisig/state0.go | 2 +- chain/actors/builtin/multisig/state2.go | 2 +- chain/actors/builtin/multisig/state3.go | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 8bdba64f0..87db745e4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,6 +16,12 @@ linters: - deadcode - scopelint +# We don't want to skip builtin/ +skip-dirs-use-default: false +skip-dirs: + - vendor$ + - testdata$ + - examples$ issues: exclude: diff --git a/chain/actors/builtin/builtin.go b/chain/actors/builtin/builtin.go index 1e535dca4..045048d1f 100644 --- a/chain/actors/builtin/builtin.go +++ b/chain/actors/builtin/builtin.go @@ -52,7 +52,7 @@ type PoStProof = proof0.PoStProof type FilterEstimate = smoothing0.FilterEstimate func FromV0FilterEstimate(v0 smoothing0.FilterEstimate) FilterEstimate { - return (FilterEstimate)(v0) + return (FilterEstimate)(v0) //nolint:unconvert } // Doesn't change between actors v0, v2, and v3. diff --git a/chain/actors/builtin/multisig/state0.go b/chain/actors/builtin/multisig/state0.go index 5548b0a5c..27dd5c413 100644 --- a/chain/actors/builtin/multisig/state0.go +++ b/chain/actors/builtin/multisig/state0.go @@ -68,7 +68,7 @@ func (s *state0) ForEachPendingTxn(cb func(id int64, txn Transaction) error) err if n <= 0 { return xerrors.Errorf("invalid pending transaction key: %v", key) } - return cb(txid, (Transaction)(out)) + return cb(txid, (Transaction)(out)) //nolint:unconvert }) } diff --git a/chain/actors/builtin/multisig/state2.go b/chain/actors/builtin/multisig/state2.go index 628da3f2c..d637abb91 100644 --- a/chain/actors/builtin/multisig/state2.go +++ b/chain/actors/builtin/multisig/state2.go @@ -67,7 +67,7 @@ func (s *state2) ForEachPendingTxn(cb func(id int64, txn Transaction) error) err if n <= 0 { return xerrors.Errorf("invalid pending transaction key: %v", key) } - return cb(txid, (Transaction)(out)) + return cb(txid, (Transaction)(out)) //nolint:unconvert }) } diff --git a/chain/actors/builtin/multisig/state3.go b/chain/actors/builtin/multisig/state3.go index 7ade2ab64..a2eb1d909 100644 --- a/chain/actors/builtin/multisig/state3.go +++ b/chain/actors/builtin/multisig/state3.go @@ -69,7 +69,7 @@ func (s *state3) ForEachPendingTxn(cb func(id int64, txn Transaction) error) err if n <= 0 { return xerrors.Errorf("invalid pending transaction key: %v", key) } - return cb(txid, (Transaction)(out)) + return cb(txid, (Transaction)(out)) //nolint:unconvert }) }