Commit d6f418b
committed
style(age): adopt strict-lint clean state from agent worktree
Squash of the 10 commits produced by the pkg/age cleanup agent
(branch worktree-agent-a686a1f4e92a27bbd) into feat/strict-lint.
The agent's branch was based on a pre-feat/strict-lint commit so
cherry-picking individually conflicted; replacing pkg/age/* with
the agent's final state keeps the same end result with a single
parent.
Categories addressed inside pkg/age (verified by agent: scope lint
count == 0, build clean, race tests pass):
- godot, godoclint -> doc comments terminate with period
- err113, errorlint -> introduce ErrLeftoverRotationBackup sentinel,
switch to cockroachdb/errors throughout
- dupl, nestif, forcetypeassert -> extract shared helpers
encryptYAMLPair/decryptYAMLPair/
encryptYAMLMap/mergeAndEncryptYAMLMap
- wrapcheck -> wrap external errors via cockroachdb/errors,
errInternalInvariant for invariant violations
- noinlineerr -> hoist 'err :=' assignments out of if-init
(~70 sites in tests + age.go)
- nlreturn, wsl_v5 -> blank lines around terminating statements
- varnamelen -> typed (was v) in type-switches
- goconst -> goosWindows constant for the 'windows' literal
- gocognit -> mergeAndEncryptYAMLValues split into
mergeAndEncryptMap/Slice/String/Scalar +
tryReuseCiphertext
- gocyclo -> RotateKeys split into refuseIfLeftoverBackups/
prepareRotationCiphertext/swapOriginalsAside/
restoreFromBackups/removeRotationBackups
No semantic changes; the rotation atomicity contract from PR #160
is preserved (the helpers are pure refactors of the existing flow).
Three nolint:wrapcheck sites remain at errors.WithHint/WithHintf
boundaries — these are the project's operator-facing hint helpers
and cannot be wrapped further without changing semantics; comments
explain why on each.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>1 parent 2455df6 commit d6f418b
3 files changed
Lines changed: 600 additions & 458 deletions
0 commit comments