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:
parent
533133486c
commit
2256a37b72
@ -1,5 +1,6 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
run:
|
run:
|
||||||
timeout: 5m
|
|
||||||
go: "1.22"
|
go: "1.22"
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
@ -14,7 +15,6 @@ linters:
|
|||||||
- mnd # An analyzer to detect magic numbers
|
- mnd # An analyzer to detect magic numbers
|
||||||
- lll # Reports long lines
|
- lll # Reports long lines
|
||||||
- intrange # intrange is a linter to find places where for loops could make use of an integer range
|
- 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
|
- gochecknoglobals # Check that no global variables exist
|
||||||
|
|
||||||
# Default/existing linters that are commonly useful
|
# Default/existing linters that are commonly useful
|
||||||
@ -22,11 +22,7 @@ linters:
|
|||||||
- errcheck
|
- errcheck
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- unused
|
- unused
|
||||||
- gosimple
|
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- typecheck
|
|
||||||
- gofmt
|
|
||||||
- goimports
|
|
||||||
- misspell
|
- misspell
|
||||||
- revive
|
- revive
|
||||||
- gosec
|
- gosec
|
||||||
@ -78,10 +74,11 @@ linters-settings:
|
|||||||
testifylint:
|
testifylint:
|
||||||
enable-all: true
|
enable-all: true
|
||||||
|
|
||||||
usetesting:
|
usetesting: {}
|
||||||
strict: true
|
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
|
max-issues-per-linter: 0
|
||||||
|
max-same-issues: 0
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
# Exclude some linters from running on tests files
|
# Exclude some linters from running on tests files
|
||||||
- path: _test\.go
|
- path: _test\.go
|
||||||
@ -98,7 +95,4 @@ issues:
|
|||||||
# Exclude unused parameter warnings for cobra command signatures
|
# Exclude unused parameter warnings for cobra command signatures
|
||||||
- text: "parameter '(args|cmd)' seems to be unused"
|
- text: "parameter '(args|cmd)' seems to be unused"
|
||||||
linters:
|
linters:
|
||||||
- revive
|
- revive
|
||||||
|
|
||||||
max-issues-per-linter: 0
|
|
||||||
max-same-issues: 0
|
|
Loading…
Reference in New Issue
Block a user