From 04f558967672d396fc43b61140e8d90e95d4da38 Mon Sep 17 00:00:00 2001 From: Juan Pablo Tosso Date: Thu, 7 Nov 2024 11:59:43 +0000 Subject: [PATCH 1/2] chore(golangci): add quality parameters to golangci --- .golangci.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index e7c44cfe5..2a280668f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,4 @@ -run: - deadline: 5m +run: {} linters: disable-all: true @@ -15,8 +14,20 @@ linters: - goimports - gofmt - gocritic + - gocyclo + - funlen issues: exclude-rules: - path: magefile\.go linters: - - deadcode \ No newline at end of file + - deadcode +linters-settings: + gocyclo: + # Minimal code complexity to report. + # Default: 30 (but we recommend 10-20) + min-complexity: 10 + errcheck: + # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. + # Such cases aren't reported by default. + # Default: false + check-type-assertions: true \ No newline at end of file From 38ce3170f42b52f73846dbff6600e93531da072d Mon Sep 17 00:00:00 2001 From: Juan Pablo Tosso Date: Thu, 7 Nov 2024 12:03:24 +0000 Subject: [PATCH 2/2] increase complexity to 20 --- .golangci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 2a280668f..3aa49c3db 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -25,9 +25,9 @@ linters-settings: gocyclo: # Minimal code complexity to report. # Default: 30 (but we recommend 10-20) - min-complexity: 10 + min-complexity: 20 errcheck: # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. # Such cases aren't reported by default. # Default: false - check-type-assertions: true \ No newline at end of file + check-type-assertions: true