Set canonical .golangci.yml to the org-standard v2 config (golangci-lint v2.12.2) #24
@@ -1,9 +1,5 @@
|
|||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
# Config schema uses the golangci-lint v2 layout (settings live under
|
|
||||||
# linters.settings, not top-level linters-settings) so that the
|
|
||||||
# thresholds below are actually applied by golangci-lint >= v2.
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
modules-download-mode: readonly
|
modules-download-mode: readonly
|
||||||
@@ -16,6 +12,7 @@ linters:
|
|||||||
- depguard # Dependency allow/block lists
|
- depguard # Dependency allow/block lists
|
||||||
- godot # Requires comments to end with periods
|
- godot # Requires comments to end with periods
|
||||||
- wsl # Deprecated, replaced by wsl_v5
|
- wsl # Deprecated, replaced by wsl_v5
|
||||||
|
- gomodguard # Deprecated, replaced by gomodguard_v2
|
||||||
- wrapcheck # Too verbose for internal packages
|
- wrapcheck # Too verbose for internal packages
|
||||||
- varnamelen # Short names like db, id are idiomatic Go
|
- varnamelen # Short names like db, id are idiomatic Go
|
||||||
settings:
|
settings:
|
||||||
@@ -28,7 +25,25 @@ linters:
|
|||||||
max-complexity: 15
|
max-complexity: 15
|
||||||
dupl:
|
dupl:
|
||||||
threshold: 100
|
threshold: 100
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
max-issues-per-linter: 0
|
max-issues-per-linter: 0
|
||||||
max-same-issues: 0
|
max-same-issues: 0
|
||||||
|
|
||||||
|
formatters:
|
||||||
|
enable:
|
||||||
|
- gofmt
|
||||||
|
- gofumpt
|
||||||
|
- goimports
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
|||||||
6
TODO.md
6
TODO.md
@@ -22,8 +22,10 @@ fmt-check, and commit.
|
|||||||
# Completed Steps
|
# Completed Steps
|
||||||
|
|
||||||
- 2026-08-07: Migrated the canonical `.golangci.yml` to the golangci-lint v2
|
- 2026-08-07: Migrated the canonical `.golangci.yml` to the golangci-lint v2
|
||||||
config layout (settings under `linters.settings`, dropped
|
schema via `golangci-lint migrate` under v2.12.2 (settings under
|
||||||
`exclude-use-default`).
|
`linters.settings`, explicit `exclusions` and `formatters` blocks,
|
||||||
|
`gomodguard` disabled in favor of `gomodguard_v2`; `gci` intentionally not
|
||||||
|
enabled).
|
||||||
- 2026-03-20: Strengthened constructor naming and Params struct rules in the Go
|
- 2026-03-20: Strengthened constructor naming and Params struct rules in the Go
|
||||||
styleguide.
|
styleguide.
|
||||||
- 2026-03-18: Documented fail-fast Dockerfile lint stage and conditional -v test
|
- 2026-03-18: Documented fail-fast Dockerfile lint stage and conditional -v test
|
||||||
|
|||||||
Reference in New Issue
Block a user