From c8beae404d9ee98060c81fb66a7d35743d26b522 Mon Sep 17 00:00:00 2001 From: Dave Hay Date: Tue, 20 Dec 2022 16:07:39 +0000 Subject: [PATCH 1/2] Updating golangci-lint to latest Upping from 1.45.0 to 1.50.1 to avoid panic Signed-off-by: Dave Hay --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c94c27d..3c22aa8 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ $(RESULTS_DIR): bootstrap-tools: $(call title,Bootstrapping tools) mkdir -p $(TEMP_DIR) - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TEMP_DIR)/ v1.45.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TEMP_DIR)/ v1.50.1 curl -sSfL https://raw.githubusercontent.com/wagoodman/go-bouncer/master/bouncer.sh | sh -s -- -b $(TEMP_DIR)/ v0.3.0 curl -sSfL https://raw.githubusercontent.com/anchore/chronicle/main/install.sh | sh -s -- -b $(TEMP_DIR)/ v0.4.1 .github/scripts/goreleaser-install.sh -b $(TEMP_DIR)/ v1.5.0 From 9926d24952905aff5aeb8bce6883fea5897f6f2c Mon Sep 17 00:00:00 2001 From: Dave Hay Date: Sun, 25 Dec 2022 07:22:38 -0800 Subject: [PATCH 2/2] Fixing linting issues / bouncer license glitch - Fixed internal/logger/logrus.go to remove deprecate ioutil package - Fixed cmd/event_loop.go to resolve linting issue - Updated .bouncer.yaml to ignore crypto/internal/boring Signed-off-by: Dave Hay --- .bouncer.yaml | 1 + cmd/event_loop.go | 3 ++- internal/logger/logrus.go | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.bouncer.yaml b/.bouncer.yaml index c89d68f..278a17c 100644 --- a/.bouncer.yaml +++ b/.bouncer.yaml @@ -20,3 +20,4 @@ ignore-packages: # All these files have been put into the public domain. # You can do whatever you want with these files. - github.com/xi2/xz + - crypto/internal/boring diff --git a/cmd/event_loop.go b/cmd/event_loop.go index 77cb583..794a4ca 100644 --- a/cmd/event_loop.go +++ b/cmd/event_loop.go @@ -14,7 +14,8 @@ import ( // eventLoop listens to worker errors (from execution path), worker events (from a partybus subscription), and // signal interrupts. Is responsible for handling each event relative to a given UI an to coordinate eventing until // an eventual graceful exit. -// nolint:funlen +// +//nolint:funlen func eventLoop(workerErrs <-chan error, signals <-chan os.Signal, subscription *partybus.Subscription, cleanupFn func(), uxs ...ui.UI) error { defer cleanupFn() events := subscription.Events() diff --git a/internal/logger/logrus.go b/internal/logger/logrus.go index 693d1bf..457bc4b 100644 --- a/internal/logger/logrus.go +++ b/internal/logger/logrus.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "io/fs" - "io/ioutil" "os" "github.com/sirupsen/logrus" @@ -58,7 +57,7 @@ func NewLogrusLogger(cfg LogrusConfig) *LogrusLogger { } output = logFile default: - output = ioutil.Discard + output = io.Discard } appLogger.SetOutput(output)