Convert .golangci.yml to the v2 layout: linters-settings and issues.exclude-use-default were rejected by the v2 schema, so the lll, funlen, cyclop, and dupl settings were never applied. Disable exhaustruct_v5 (the newer major version of the already-disabled exhaustruct) and the deprecated gomodguard. Pin the golangci-lint image at v2.15.0 in the Makefile and Dockerfile.
35 lines
991 B
YAML
35 lines
991 B
YAML
version: "2"
|
|
|
|
run:
|
|
timeout: 5m
|
|
modules-download-mode: readonly
|
|
|
|
linters:
|
|
default: all
|
|
disable:
|
|
# Genuinely incompatible with project patterns
|
|
- exhaustruct # Requires all struct fields
|
|
- exhaustruct_v5 # Same linter, newer major version (since v2.13.0)
|
|
- depguard # Dependency allow/block lists
|
|
- godot # Requires comments to end with periods
|
|
- wsl # Deprecated, replaced by wsl_v5
|
|
- gomodguard # Deprecated, replaced by gomodguard_v2
|
|
- wrapcheck # Too verbose for internal packages
|
|
- varnamelen # Short names like db, id are idiomatic Go
|
|
settings:
|
|
lll:
|
|
line-length: 88
|
|
funlen:
|
|
lines: 80
|
|
statements: 50
|
|
cyclop:
|
|
max-complexity: 15
|
|
dupl:
|
|
threshold: 100
|
|
|
|
# No default exclusions: v2 applies none unless linters.exclusions.presets
|
|
# is set, which replaces v1's exclude-use-default: false.
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|