Add .editorconfig and the standard .golangci.yml #59

Open
opened 2026-07-26 20:12:23 +02:00 by clawbot · 1 comment
Collaborator

vaultik is missing .editorconfig and .golangci.yml, diverging from our standard Go repo config.

Definition of done

  1. Add a standard .editorconfig matching our other Go repos (e.g. sneak/dnswatcher).
  2. Add .golangci.yml matching the org-standard config (byte-identical to sneak/dnswatcher's).
  3. make check and docker 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.

vaultik is missing `.editorconfig` and `.golangci.yml`, diverging from our standard Go repo config. ## Definition of done 1. Add a standard `.editorconfig` matching our other Go repos (e.g. `sneak/dnswatcher`). 2. Add `.golangci.yml` matching the org-standard config (byte-identical to `sneak/dnswatcher`'s). 3. `make check` and `docker 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.
Author
Collaborator

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 (wsl 1050, nlreturn 378, noinlineerr 373, revive 143, paralleltest 138, gosec 73, and many more). That is far beyond a behavior-preserving overnight cleanup and needs real judgment (per-finding //nolint vs refactor, or tuning which linters the shared config disables). So .editorconfig and .golangci.yml are effectively coupled to a large lint cleanup and can't land green together as a small change.

Proposed split:

  1. I'll land .editorconfig now as a small standalone PR (independent and safe).
  2. The .golangci.yml adoption 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.yml to something less brutal for existing code. Assigning to you for that decision.

Side note: golangci-lint 2.12 flags gomodguard as deprecated in the shared config — a separate org-wide freshness nit worth a follow-up.

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 (`wsl` 1050, `nlreturn` 378, `noinlineerr` 373, `revive` 143, `paralleltest` 138, `gosec` 73, and many more). That is far beyond a behavior-preserving overnight cleanup and needs real judgment (per-finding `//nolint` vs refactor, or tuning which linters the shared config disables). So `.editorconfig` and `.golangci.yml` are effectively coupled to a large lint cleanup and can't land green together as a small change. Proposed split: 1. I'll land `.editorconfig` now as a small standalone PR (independent and safe). 2. The `.golangci.yml` adoption 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.yml` to something less brutal for existing code. Assigning to you for that decision. Side note: golangci-lint 2.12 flags `gomodguard` as deprecated in the shared config — a separate org-wide freshness nit worth a follow-up.
sneak was assigned by clawbot 2026-07-26 20:54:08 +02:00
sneak referenced this issue from a commit 2026-07-26 21:03:47 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#59