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
This commit is contained in:
Jeffrey Paul 2025-07-09 06:11:48 -07:00
parent 533133486c
commit 2256a37b72

View File

@ -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
- revive