From e7443258fb2d6871f6ed78671a034c483fd1eceb Mon Sep 17 00:00:00 2001 From: William Banfield Date: Fri, 28 Oct 2022 10:39:32 -0400 Subject: [PATCH] nolint gosec --- Makefile | 2 +- cmd/tendermint/commands/debug/util.go | 3 +-- node/node.go | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 11dfffb51..f2bfb7a1f 100644 --- a/Makefile +++ b/Makefile @@ -277,7 +277,7 @@ format: lint: @echo "--> Running linter" - @golangci-lint run + @go run github.com/golangci/golangci-lint/cmd/golangci-lint run .PHONY: lint DESTINATION = ./index.html.md diff --git a/cmd/tendermint/commands/debug/util.go b/cmd/tendermint/commands/debug/util.go index accf65413..089817f2f 100644 --- a/cmd/tendermint/commands/debug/util.go +++ b/cmd/tendermint/commands/debug/util.go @@ -67,8 +67,7 @@ func copyConfig(home, dir string) error { func dumpProfile(dir, addr, profile string, debug int) error { endpoint := fmt.Sprintf("%s/debug/pprof/%s?debug=%d", addr, profile, debug) - //nolint: gosec - resp, err := http.Get(endpoint) + resp, err := http.Get(endpoint) //nolint: gosec if err != nil { return fmt.Errorf("failed to query for %s profile: %w", profile, err) } diff --git a/node/node.go b/node/node.go index e40b72e99..c686c8bd9 100644 --- a/node/node.go +++ b/node/node.go @@ -891,7 +891,7 @@ func NewNode(config *cfg.Config, if config.RPC.PprofListenAddress != "" { go func() { logger.Info("Starting pprof server", "laddr", config.RPC.PprofListenAddress) - logger.Error("pprof server error", "err", http.ListenAndServe(config.RPC.PprofListenAddress, nil)) + logger.Error("pprof server error", "err", http.ListenAndServe(config.RPC.PprofListenAddress, nil)) //nolint: gosec }() }