Files
archie/.golangci.yml
T
sam 9187f023c3 chore: drop residual beads tooling from build and lint config
Beads was removed as the issue tracker in 8bf0f6b, but five files still
referenced it. The Dockerfile one had real cost: every agent container
downloaded and installed bd v1.1.2 into the image for a tool the project
no longer uses.

- Dockerfile: remove the beads install stanza
- .golangci.yml: the godox comment told agents `bd create`; tracked work
  now lives in GitHub Issues
- .air.toml, .dockerignore, .gitignore: drop .beads exclusions

Old archie-core-xxx identifiers in git history do not resolve to anything;
all 416 issues were migrated by title, which is how they must be matched.
2026-08-09 18:10:11 +10:00

146 lines
3.0 KiB
YAML

# golangci-lint configuration for archie-core.
#
# Schema: https://golangci-lint.run/jsonschema/golangci.jsonschema.json
# Every option is documented upstream in .golangci.reference.yml.
# Validate changes with `golangci-lint config verify` before committing.
#
# Philosophy: this repo's gate is `task check`, and archied runs that same
# gate against its own PRs. A linter here is therefore an environmental
# constraint an agent cannot argue its way around -- the doctrine CLAUDE.md
# applies to safety, applied to structure. Curated over exhaustive: a noisy
# gate gets disabled, and a disabled gate enforces nothing.
version: "2"
run:
timeout: 5m
tests: true
go: "1.26"
linters:
default: standard
enable:
# Structure and complexity
- cyclop
- dupl
- funlen
- gocognit
- gocyclo
- maintidx
- nestif
# Architecture
- importas
- interfacebloat
# Correctness
- bodyclose
- containedctx
- contextcheck
- copyloopvar
- durationcheck
- errorlint
- fatcontext
- forcetypeassert
- makezero
- nilerr
- nilnesserr
- noctx
- reassign
- recvcheck
- rowserrcheck
- sqlclosecheck
# Idiom and hygiene
- gocritic
- godox
- misspell
- predeclared
- sloglint
- unconvert
- usestdlibvars
- usetesting
settings:
cyclop:
max-complexity: 15
dupl:
threshold: 150
funlen:
lines: 80
statements: 50
gocognit:
min-complexity: 30
gocyclo:
min-complexity: 20
maintidx:
under: 20
nestif:
min-complexity: 5
godox:
# Tracked work lives in GitHub Issues.
keywords:
- FIXME
- TODO
- HACK
- BUG
interfacebloat:
max: 8
sloglint:
no-mixed-args: true
key-naming-case: snake
exclusions:
generated: lax
warn-unused: true
presets:
- comments
- std-error-handling
- common-false-positives
- legacy
rules:
# Table-driven tests are supposed to resemble each other, and
# splitting one to satisfy a complexity budget makes it harder to
# read. Correctness linters still apply to tests.
- path: _test\.go
linters:
- cyclop
- dupl
- funlen
- gocognit
- gocyclo
- maintidx
formatters:
enable:
- gofumpt
- goimports
- gci
settings:
gofumpt:
extra-rules: true
gci:
# Matches the grouping already used across this repo.
sections:
- standard
- default
- prefix(github.com/samcharles93/archie-core)
custom-order: true
exclusions:
generated: strict
issues:
# 0 = report everything. The defaults (50 per linter, 3 per message)
# silently truncate, which turns the issue count into a number you
# cannot track downward.
max-issues-per-linter: 0
max-same-issues: 0
output:
show-stats: true
sort-order:
- linter
- file