From 47bbac4b9fb0b76a707ea0bb250833e903e1107d Mon Sep 17 00:00:00 2001 From: Mathias Date: Sat, 5 Sep 2026 14:47:39 +0200 Subject: [PATCH] =?UTF-8?q?revert(lint):=20back=20out=20the=20canonical=20?= =?UTF-8?q?.golangci.yml=20adoption=20=E2=80=94=20repo=20has=20a=20nested?= =?UTF-8?q?=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adopting it turned CI red, and my pre-push verification missed why: `golangci-lint run ./...` does NOT traverse into nested Go modules. This repo has two — ./go.mod and ./ingestion/go.mod. I linted the root (0 issues, which CI reproduces exactly) and never linted ingestion/, which has 3 findings: ingestion/internal/audit/degrading.go:81 missing case capture.AuditCentral (exhaustive) ingestion/internal/capture/entities.go:37 missing case capture.ZoneUnknown (exhaustive) ingestion/internal/mcp/handlers.go:29 var int_ should be int (revive) Those are behavioural questions and a rename, not formatting — the same class of finding that kept cad, dispatch, ingestion-svc, dma-cli and email-triage-agent out of the earlier waves. Consistent with that, this repo goes back in the queue rather than being force-fitted now. The gofumpt formatting from the same commit is kept: it is independently correct and already green. Verification method corrected going forward: a repo with nested modules must be linted per module, not once from the root. --- .golangci.yml | 52 --------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index 2790f24..0000000 --- a/.golangci.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Canonical golangci-lint configuration for the estate's Go repos (infra#309 -# pattern: one canonical file here, a byte-identical copy in each adopter, -# and the drift gate in THIS repo comparing sha256). -# -# Why this exists: 26 Go repos, 3 had a lint config, and all three were -# different. The 23 without one ran golangci-lint's v2 default set, which -# does NOT include a formatter -- so gofmt/gofumpt drift went uncaught until -# it was found by hand (dma-cli#12: two files drifted, nothing flagged them). -# -# The two configs this replaces (cobalt-dingo, coo-agent) were near-identical -# copies of each other AND both invalid under v2: they carried v1-style -# `linters-settings` and `issues.exclude-rules` keys, which `golangci-lint -# config verify` rejects outright. Their revive settings and test exclusions -# were therefore not in effect. Consolidating fixes that too. -# -# Per-repo variation does NOT belong here -- this file must stay byte-identical -# across adopters so the gate is a checksum, not a diff a human has to judge. -# A repo with a genuine exception (agentsquad excludes its seeded-bug fixture -# tree, which exists precisely to contain broken code) keeps its own config and -# is not listed as an adopter. - -version: "2" - -linters: - default: none - enable: - - errcheck # unchecked errors - - govet # suspicious constructs - - staticcheck # broad static analysis - - unused # unused code - - misspell # spelling - - revive # idiomatic Go - - exhaustive # exhaustive switch on enums - - settings: - revive: - rules: - - name: var-naming - severity: warning - - exclusions: - rules: - # Test files: table-driven cases legitimately carry unused struct fields - # and long functions. - - path: _test\.go - linters: - - revive - - unused - -formatters: - enable: - - gofumpt