From 23d22a0f1901ae611826db30efde482a6d600ff1 Mon Sep 17 00:00:00 2001 From: sneak Date: Fri, 7 Aug 2026 16:29:49 +0000 Subject: [PATCH] Add standard .golangci.yml (refs #59) Copied byte-for-byte from the vendored policy set in sneak/prompts. The new config surfaces 2,990 lint findings; remediation is tracked in issue #61 rather than being bundled here, so #59 stays open until make check is green under this config. --- .golangci.yml | 32 ++++++++++++++++++++++++++++++++ TODO.md | 11 +++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..34a8e31 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,32 @@ +version: "2" + +run: + timeout: 5m + modules-download-mode: readonly + +linters: + default: all + disable: + # Genuinely incompatible with project patterns + - exhaustruct # Requires all struct fields + - depguard # Dependency allow/block lists + - godot # Requires comments to end with periods + - wsl # Deprecated, replaced by wsl_v5 + - wrapcheck # Too verbose for internal packages + - varnamelen # Short names like db, id are idiomatic Go + +linters-settings: + lll: + line-length: 88 + funlen: + lines: 80 + statements: 50 + cyclop: + max-complexity: 15 + dupl: + threshold: 100 + +issues: + exclude-use-default: false + max-issues-per-linter: 0 + max-same-issues: 0 diff --git a/TODO.md b/TODO.md index c2091ca..1458942 100644 --- a/TODO.md +++ b/TODO.md @@ -14,12 +14,16 @@ pre-1.0 # Next Step -Bring the repo into policy compliance in one commit: add REPO_POLICIES.md -(copied from sneak/prompts), .editorconfig, and .golangci.yml. Verify -`make check` stays green with the new lint config. +Remediate the 2,990 lint findings surfaced by the standard +`.golangci.yml` (issue #61): behavior-preserving fixes in per-linter or +per-package chunks, mechanical linters first, until `make check` is +green on `main`. # Completed Steps +- 2026-08-07: Added the standard `.golangci.yml` and `.editorconfig` + (issue #59); lint findings under the new config are tracked in issue + #61. `script/bootstrap` now installs sqlite3 (needed by tests). - 2026-07-07 Adopted scripts-to-rule-them-all: `script/` entrypoints, Makefile shims, README Entrypoints section - 2026-07-02: Consolidated CLI verbs, retired overlapping commands; bound @@ -42,7 +46,6 @@ Bring the repo into policy compliance in one commit: add REPO_POLICIES.md # Future Steps -- Add REPO_POLICIES.md, .editorconfig, .golangci.yml (the Next Step). - Reconcile the uncommitted ARCHITECTURE.md edits on main: finish and commit, or revert. - Review stale local branches (add-godoc-to-cli-package,