Fix more lint warnings
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
7232e5481c
commit
b372881e91
@ -207,7 +207,7 @@ var msigInspectCmd = &cli.Command{
|
||||
fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%d\t%x\n", txid, state(tx), tx.To, types.FIL(tx.Value), tx.Method, tx.Params)
|
||||
}
|
||||
if err := w.Flush(); err != nil {
|
||||
return xerrors.Errorf("flushing ouput: %+v", err)
|
||||
return xerrors.Errorf("flushing output: %+v", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ var sealBenchCmd = &cli.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
err = os.MkdirAll(sdir, 0775)
|
||||
err = os.MkdirAll(sdir, 0775) //nolint:gosec
|
||||
if err != nil {
|
||||
return xerrors.Errorf("creating sectorbuilder dir: %w", err)
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ func PreSeal(maddr address.Address, pt abi.RegisteredProof, offset abi.SectorNum
|
||||
SealProofType: spt,
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(sbroot, 0775); err != nil { //golint:gosec
|
||||
if err := os.MkdirAll(sbroot, 0775); err != nil { //nolint:gosec
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api lapi.FullNode,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer lr.Close() //notlint:errcheck
|
||||
defer lr.Close() //nolint:errcheck
|
||||
|
||||
log.Info("Initializing libp2p identity")
|
||||
|
||||
|
@ -6,17 +6,16 @@ import (
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
)
|
||||
|
||||
//nolint:gosec
|
||||
func SetupLogLevels() {
|
||||
if _, set := os.LookupEnv("GOLOG_LOG_LEVEL"); !set {
|
||||
logging.SetLogLevel("*", "INFO")
|
||||
logging.SetLogLevel("dht", "ERROR")
|
||||
logging.SetLogLevel("swarm2", "WARN")
|
||||
logging.SetLogLevel("bitswap", "WARN")
|
||||
//logging.SetLogLevel("pubsub", "WARN")
|
||||
logging.SetLogLevel("connmgr", "WARN")
|
||||
logging.SetLogLevel("advmgr", "DEBUG")
|
||||
logging.SetLogLevel("stores", "DEBUG")
|
||||
logging.SetLogLevel("nat", "INFO")
|
||||
_ = logging.SetLogLevel("*", "INFO")
|
||||
_ = logging.SetLogLevel("dht", "ERROR")
|
||||
_ = logging.SetLogLevel("swarm2", "WARN")
|
||||
_ = logging.SetLogLevel("bitswap", "WARN")
|
||||
//_ = logging.SetLogLevel("pubsub", "WARN")
|
||||
_ = logging.SetLogLevel("connmgr", "WARN")
|
||||
_ = logging.SetLogLevel("advmgr", "DEBUG")
|
||||
_ = logging.SetLogLevel("stores", "DEBUG")
|
||||
_ = logging.SetLogLevel("nat", "INFO")
|
||||
}
|
||||
}
|
||||
|
@ -435,7 +435,6 @@ func (a *API) ClientGenCar(ctx context.Context, ref api.FileRef, outputPath stri
|
||||
ssb.ExploreAll(ssb.ExploreRecursiveEdge())).Node()
|
||||
|
||||
f, err := os.Create(outputPath)
|
||||
defer f.Close() //nolint:errcheck
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -445,7 +444,7 @@ func (a *API) ClientGenCar(ctx context.Context, ref api.FileRef, outputPath stri
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return f.Close()
|
||||
}
|
||||
|
||||
func (a *API) clientImport(ref api.FileRef, bufferedDS *ipld.BufferedDAG) (cid.Cid, error) {
|
||||
|
@ -18,7 +18,7 @@ func AddrFilters(filters []string) func() (opts Libp2pOpts, err error) {
|
||||
if err != nil {
|
||||
return opts, fmt.Errorf("incorrectly formatted address filter in config: %s", s)
|
||||
}
|
||||
opts.Opts = append(opts.Opts, libp2p.FilterAddresses(f)) //golint:staticcheck
|
||||
opts.Opts = append(opts.Opts, libp2p.FilterAddresses(f)) //nolint:staticcheck
|
||||
}
|
||||
return opts, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user