From 2256a37b72ae7ebade0b19c74755738e67b159da Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 9 Jul 2025 06:11:48 -0700 Subject: [PATCH] Update golangci-lint configuration to v2.2.1 format - Add version field set to "2" for golangci-lint v2.2.1 - Remove formatters (gofmt, gofumpt, goimports) from linters list - Remove unsupported linters (gosimple, typecheck) - Simplify usetesting configuration - Move max-issues settings to proper location in issues section - Remove timeout field from run section --- .golangci.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 93706fe..6bb3fda 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,6 @@ +version: "2" + run: - timeout: 5m go: "1.22" linters: @@ -14,7 +15,6 @@ linters: - mnd # An analyzer to detect magic numbers - lll # Reports long lines - intrange # intrange is a linter to find places where for loops could make use of an integer range - - gofumpt # Gofumpt checks whether code was gofumpt-ed - gochecknoglobals # Check that no global variables exist # Default/existing linters that are commonly useful @@ -22,11 +22,7 @@ linters: - errcheck - staticcheck - unused - - gosimple - ineffassign - - typecheck - - gofmt - - goimports - misspell - revive - gosec @@ -78,10 +74,11 @@ linters-settings: testifylint: enable-all: true - usetesting: - strict: true + usetesting: {} issues: + max-issues-per-linter: 0 + max-same-issues: 0 exclude-rules: # Exclude some linters from running on tests files - path: _test\.go @@ -98,7 +95,4 @@ issues: # Exclude unused parameter warnings for cobra command signatures - text: "parameter '(args|cmd)' seems to be unused" linters: - - revive - - max-issues-per-linter: 0 - max-same-issues: 0 \ No newline at end of file + - revive \ No newline at end of file