Add .editorconfig and the standard .golangci.yml #59
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
vaultik is missing
.editorconfigand.golangci.yml, diverging from our standard Go repo config.Definition of done
.editorconfigmatching our other Go repos (e.g.sneak/dnswatcher)..golangci.ymlmatching the org-standard config (byte-identical tosneak/dnswatcher's).make checkanddocker build .are green under the new config. If adding the linter surfaces findings, remediate them BEHAVIOR-PRESERVINGLY. If the remediation is large (more than ~50 findings), STOP and report so the lint cleanup can be split into its own issue/PR rather than bundled here.The finishing commit's title must end with
(closes #N)referencing this issue.Update after attempting this: the two files add trivially (both fetched byte-for-byte from
sneak/dnswatcher), but enabling the org-standard.golangci.yml(linters: default: all) surfaces ~2,990 lint findings across 40+ linters on vaultik (wsl1050,nlreturn378,noinlineerr373,revive143,paralleltest138,gosec73, and many more). That is far beyond a behavior-preserving overnight cleanup and needs real judgment (per-finding//nolintvs refactor, or tuning which linters the shared config disables). So.editorconfigand.golangci.ymlare effectively coupled to a large lint cleanup and can't land green together as a small change.Proposed split:
.editorconfignow as a small standalone PR (independent and safe)..golangci.ymladoption plus the lint cleanup is a separate, larger tracked effort — your call whether to do the full behavior-preserving cleanup, or tune the shared.golangci.ymlto something less brutal for existing code. Assigning to you for that decision.Side note: golangci-lint 2.12 flags
gomodguardas deprecated in the shared config — a separate org-wide freshness nit worth a follow-up.Plan for finishing this issue:
.editorconfigis already done — landed in928c389(PR #60) and isbyte-identical to the canonical copy in the vendored policy set in
sneak/prompts..golangci.yml, copied byte-for-byte from the vendored policy setin
sneak/prompts(which now disables the deprecatedwsllinter,among others), on a feature branch.
make checkunder the new config and count findings:commits on the same branch.
here), land the config anyway with the count and per-linter
breakdown posted here, and file a follow-up issue for the
remediation with its own definition of done, rather than doing a
mass rewrite now.
make fmt, merge tomain, and push. The finishing commit titleends with
(closes #59)only ifmake checkis actually green withthe new config in place; otherwise this issue stays open pending the
follow-up.
Note: the known org-wide
gomodguarddeprecation warning undergolangci-lint 2.12.x may appear; it is tracked separately and will not be
chased here.
Status: the standard
.golangci.ymlhas landed onmain(928c389..23d22a0). Source: copied byte-for-byte from the vendored
policy set in
sneak/prompts(verified identical withcmp), per thepolicy that agents never modify it.
.editorconfigwas already in placefrom PR #60 and matches the canonical copy exactly, so both files from
the definition of done are now present.
What landed:
23d22a0— Add standard.golangci.yml(refs #59), plus theTODO.mdworkflow update.c9c72ef—script/bootstrapnow installssqlite3: the test suiteshells out to it for
VACUUM, but bootstrap didn't install it, somake testfailed on a fresh environment. Fixed in passing since agreen
make testis a prerequisite for this issue's definition ofdone.
Lint status under the new config: 2,990 findings — far past the ~50
threshold in the definition of done, so per the split decided above the
remediation is NOT bundled here. It is tracked in #61 with the full
per-linter breakdown (top offenders:
wsl_v51050,nlreturn378,noinlineerr373,revive143,paralleltest138,err113123) and abehavior-preserving definition of done.
make testandmake fmt-checkare green; only
make lintis red.Consequences until #61 is done:
make check, and thereforedocker build .and CI, are red onmain. This issue stays open — thefinishing commit deliberately says
refs #59, notcloses #59, becausethe repo is not green under the new config yet. #61's definition of done
ends with closing this issue.
Confirmed: the known org-wide
gomodguarddeprecation warning appearsunder golangci-lint 2.12.2 (
replaced by gomodguard_v2). Not chasedhere per the standing decision; it needs a canonical-config update in
sneak/prompts.