Files
go-validate/.golangci.yml
Jim Myhrberg f24d999dff chore(ci/lint/config): update golangci-lint configuration and workflows
Refactor the golangci-lint configuration to use the latest version and
update GitHub Actions workflows. Key changes include:

- Update golangci-lint to v2.6
- Update GitHub Actions to use latest checkout and setup-go actions
- Update Go versions in test matrix
- Remove deprecated cache steps
- Update Makefile golangci-lint tool version
- Minor documentation formatting improvements
2025-10-30 21:24:28 +00:00

104 lines
1.8 KiB
YAML

version: "2"
run:
modules-download-mode: readonly
allow-parallel-runners: true
linters:
default: none
enable:
- asciicheck
- bodyclose
- dupl
- durationcheck
- errcheck
- errorlint
- exhaustive
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- godot
- goprintffuncname
- gosec
- govet
- importas
- ineffassign
- lll
- misspell
- nakedret
- nilerr
- noctx
- nolintlint
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- tparallel
- unconvert
- unparam
- unused
- wastedassign
- whitespace
settings:
funlen:
lines: 100
statements: 150
goconst:
min-occurrences: 5
gocyclo:
min-complexity: 20
govet:
disable:
- fieldalignment
enable-all: true
lll:
line-length: 80
tab-width: 4
misspell:
locale: US
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- dupl
- funlen
- goconst
path: _test\.go
- linters:
- lll
source: "^//go:generate "
- linters:
- lll
source: "`json:"
- linters:
- lll
source: "`yaml:"
- linters:
- lll
source: "`form:"
- path: (.+)\.go$
text: Using the variable on range scope `tt` in function literal
- path: (.+)\.go$
text: Using the variable on range scope `tc` in function literal
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofumpt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$