From ed309821ae47e4ea472f3ab0e45f399156e1adcd Mon Sep 17 00:00:00 2001 From: Seebs Date: Mon, 19 Oct 2020 14:25:11 -0500 Subject: [PATCH] uprev golangci-lint, fix a minor lint in rbf I have a newer staticcheck and golangci-lint on my laptop, and it started complaining about something. The first comment added disables the check in staticcheck-as-a-command, the second disables it when it's being done by golangci-lint, which invokes the analysis passes directly and displays the output differently, and also doesn't recognize the hints used by staticcheck. Newer golangci-lint doesn't find anything else that it wants to complain about. --- .circleci/config.yml | 2 +- rbf/tx.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 81be4fb9d..d3699778f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,7 +53,7 @@ jobs: name: golang steps: - checkout-plus - - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/local/bin v1.23.8 + - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/local/bin v1.31.0 - run: make golangci-lint go-mod-tidy: executor: diff --git a/rbf/tx.go b/rbf/tx.go index 153e38380..181df99a6 100644 --- a/rbf/tx.go +++ b/rbf/tx.go @@ -96,7 +96,8 @@ func (tx *Tx) Commit() error { for _, path := range tx.updatedSegmentPaths { segment := walSegmentByPath(tx.segments, path) assert(segment != nil) - tx.db.updateWALSegment(*segment) + //lint:ignore SA5011 the assert above prevents this from being nil + tx.db.updateWALSegment(*segment) //nolint:staticcheck } tx.db.mu.Unlock() }