underscore/.golangci.yml
Ruidy c53d46816f
refactor: migrate to Go 1.22 slices/cmp, update linters
Replace usage of golang.org/x/exp/constraints with Go 1.22 cmp/slices.
Update .golangci.yml to new v2 format and enable gofmt/goimports.
Refactor imports and type constraints across codebase for consistency.
2025-09-01 23:08:10 -04:00

54 lines
984 B
YAML

version: "2"
linters:
enable:
- bodyclose
- depguard
- dogsled
- errorlint
- gocritic
- gocyclo
- goprintffuncname
- gosec
- misspell
- noctx
- nolintlint
- prealloc
- rowserrcheck
- staticcheck
- unconvert
- unparam
- whitespace
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
settings:
depguard:
rules:
main:
list-mode: lax
files:
- $all
allow:
- $gostd
- github.com/rjNemo/underscore
- github.com/rjNemo/underscore/...
- github.com/stretchr/testify/...
- golang.org/x/exp/constraints
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$