From bf76b9dfb0174ad122c87bca7950f67237a8680e Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Tue, 5 Aug 2025 05:43:36 -0400 Subject: [PATCH] be more flexible --- .golangci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 998a884..a9622e3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -39,6 +39,7 @@ linters: - ginkgolinter # [if you use ginkgo/gomega] enforces standards of using ginkgo and gomega - gochecknoglobals # checks that no global variables exist - cyclop # replaced by revive + - gocyclo # replaced by revive - funlen # replaced by revive - godox # TODO's are OK - ireturn # It's OK @@ -47,6 +48,7 @@ linters: - goconst # finds repeated strings that could be replaced by a constant - goheader # checks is file header matches to pattern - gomodguard # [use more powerful depguard] allow and block lists linter for direct Go module dependencies + - gomoddirectives - err113 # bad advice about dynamic errors - lll # [replaced by golines] reports long lines - mnd # detects magic numbers, duplicated by revive @@ -98,6 +100,7 @@ linters: errcheck: # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. check-type-assertions: true + check-blank: true exhaustive: # Program elements to check for exhaustiveness. @@ -177,14 +180,15 @@ linters: - name: cognitive-complexity arguments: [50] - name: cyclomatic - severity: warning - arguments: [30] + arguments: [55] - name: function-length arguments: [150, 225] - name: line-length-limit arguments: [150] - name: nested-structs disabled: true + - name: max-public-structs + arguments: [10] rowserrcheck: # database/sql is always checked. @@ -226,6 +230,7 @@ linters: - dupl - gosec - godot + - govet # alignment - noctx - perfsprint - revive