From 2fcb2b5c16e21d2a94741e19bbe7443d88127273 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 4 Jun 2020 22:35:04 +0200 Subject: .golangci.yml: enable gocognit checker Finds too complex functions. Similar to gocyclo, but uses somewhat different metric. --- pkg/report/linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/report/linux.go') diff --git a/pkg/report/linux.go b/pkg/report/linux.go index 760c9949c..6f968ada9 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -196,7 +196,7 @@ func (ctx *linux) findFirstOops(output []byte) (oops *oops, startPos int, contex } // Yes, it is complex, but all state and logic are tightly coupled. It's unclear how to simplify it. -// nolint: gocyclo +// nolint: gocyclo, gocognit func (ctx *linux) findReport(output []byte, oops *oops, startPos int, context string, useQuestionable bool) ( endPos, reportEnd int, report []byte, prefix [][]byte) { // Prepend 5 lines preceding start of the report, -- cgit mrf-deployment