Finishes the lint remediation tracked in #61, which in turn unblocks #59
(both files from #59's definition of done are already on main; #59 stays
open only because make check is red under the canonical config).
What this branch does
Chunk 2 of the remediation, on top of the mechanical chunk 1 already on main. Behavior-preserving throughout:
err113: dynamic errors replaced with package-level sentinels and %w
wrapping; direct comparisons converted to errors.Is
goprintffuncname: printf-style helpers renamed with an f suffix
(ui.Writer message methods, cli.ReportErrorf, database.Fatalf,
vaultik stdoutf) and all call sites updated
revive: stuttering type names renamed (blob.Handler, blob.WithReader, blob.ChunkPosition, storage.URL, storage.Info),
doc comments and package comments added, unused parameters blanked
contextcheck/noctx: ctx threaded through blob.Packer
(AddChunk/Flush/FinalizeBlob/PackChunks) and scanner call sites
funlen/cyclop/gocognit/nestif/dupl: oversized or duplicated
functions split into focused helpers
paralleltest/tparallel/thelper/usetesting/testpackage: tests
parallelized where safe, helpers marked, t.TempDir adopted
gosec: integer conversions clamped or justified; remaining findings
suppressed with per-site justifications
Removes the deprecated log.LogOptions alias (callers migrated to log.Options)
.golangci.yml, Dockerfile, and Makefile on this branch are
byte-identical to main — the canonical config (sha256 021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb) is
not modified here.
Current state: NOT green
make check on this branch exits 2. make test and make fmt-check pass
(all 14 packages ok), but make lint still reports 80 findings:
wsl_v5: 60
sqlclosecheck: 10
gosec: 4
prealloc: 3
revive: 3
Note that commit 7ae470e's message asserts "make check is green"; that
assertion does not hold as of this branch tip. Labeled needs-checks
until the remaining 80 are fixed.
Finishes the lint remediation tracked in #61, which in turn unblocks #59
(both files from #59's definition of done are already on `main`; #59 stays
open only because `make check` is red under the canonical config).
## What this branch does
Chunk 2 of the remediation, on top of the mechanical chunk 1 already on
`main`. Behavior-preserving throughout:
- `err113`: dynamic errors replaced with package-level sentinels and `%w`
wrapping; direct comparisons converted to `errors.Is`
- `goprintffuncname`: printf-style helpers renamed with an `f` suffix
(`ui.Writer` message methods, `cli.ReportErrorf`, `database.Fatalf`,
vaultik `stdoutf`) and all call sites updated
- `revive`: stuttering type names renamed (`blob.Handler`,
`blob.WithReader`, `blob.ChunkPosition`, `storage.URL`, `storage.Info`),
doc comments and package comments added, unused parameters blanked
- `contextcheck`/`noctx`: `ctx` threaded through `blob.Packer`
(`AddChunk`/`Flush`/`FinalizeBlob`/`PackChunks`) and scanner call sites
- `funlen`/`cyclop`/`gocognit`/`nestif`/`dupl`: oversized or duplicated
functions split into focused helpers
- `paralleltest`/`tparallel`/`thelper`/`usetesting`/`testpackage`: tests
parallelized where safe, helpers marked, `t.TempDir` adopted
- `gosec`: integer conversions clamped or justified; remaining findings
suppressed with per-site justifications
- Removes the deprecated `log.LogOptions` alias (callers migrated to
`log.Options`)
`.golangci.yml`, `Dockerfile`, and `Makefile` on this branch are
byte-identical to `main` — the canonical config (sha256
`021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb`) is
not modified here.
## Current state: NOT green
`make check` on this branch exits 2. `make test` and `make fmt-check` pass
(all 14 packages `ok`), but `make lint` still reports **80 findings**:
- `wsl_v5`: 60
- `sqlclosecheck`: 10
- `gosec`: 4
- `prealloc`: 3
- `revive`: 3
Note that commit `7ae470e`'s message asserts "make check is green"; that
assertion does not hold as of this branch tip. Labeled `needs-checks`
until the remaining 80 are fixed.
Fix every finding surfaced by the canonical .golangci.yml with
golangci-lint v2.12.2 (refs #61), behavior-preserving throughout:
- err113: dynamic errors replaced with package-level sentinels and %w
wrapping; direct comparisons converted to errors.Is
- goprintffuncname: printf-style helpers renamed with an f suffix
(ui.Writer message methods, cli.ReportErrorf, database.Fatalf,
vaultik stdoutf) and all call sites updated
- revive: stuttering type names renamed (blob.Handler, blob.WithReader,
blob.ChunkPosition, storage.URL, storage.Info), doc comments added,
unused parameters blanked, package comments added
- contextcheck/noctx: ctx threaded through blob.Packer
(AddChunk/Flush/FinalizeBlob/PackChunks) and scanner call sites;
context-aware exec and sql variants used
- funlen/cyclop/gocognit/nestif/dupl: oversized or duplicated
functions split into focused helpers across production and test code
- paralleltest/tparallel/thelper/usetesting/testpackage: tests
parallelized where safe (global log.Initialize kept in the serial
phase), helpers marked, t.TempDir adopted, external test packages
where only exported API is used
- gosec: integer conversions clamped or justified, header timeouts
added, remaining findings suppressed with per-site justifications
- mnd/goconst/lll/wsl_v5/nlreturn/noinlineerr/errcheck and other
mechanical findings fixed directly
Remove the deprecated log.LogOptions alias (callers migrated to
log.Options). make check is green.
git diff origin/main origin/golangci-v2.12.2 is empty. The branch
contributes zero content delta. The "126 changed files / 8,184
additions" shown on this PR is a merge-base artifact: the branch's merge
base with main predates cc58583, so the three-dot diff replays work
that is already on main. The chunk-2 remediation landed on main via
PR #62 and this branch is a leftover pointer at the same tree.
The material consequence: main is currently red. The 80 lint
findings I reported earlier were measured on this branch's content, which
is byte-for-byte main's content. So make check fails on main today,
and therefore so does .gitea/workflows/check.yml and docker build .:
make test and make fmt-check are green; only make lint is red
Remediation continues against main directly on a new branch, lint-remediation-final, which will get its own PR closing #61 and #59.
This PR and the golangci-v2.12.2 branch are being retired.
Closing this PR as empty — correcting my own earlier analysis.
`origin/golangci-v2.12.2` and `origin/main` have **identical tree
hashes**:
```
git rev-parse origin/main^{tree} origin/golangci-v2.12.2^{tree}
0f36f0b99599b63018da6cd3b0a62e2046eb3c16
0f36f0b99599b63018da6cd3b0a62e2046eb3c16
```
`git diff origin/main origin/golangci-v2.12.2` is empty. The branch
contributes **zero** content delta. The "126 changed files / 8,184
additions" shown on this PR is a merge-base artifact: the branch's merge
base with `main` predates `cc58583`, so the three-dot diff replays work
that is already on `main`. The chunk-2 remediation landed on `main` via
PR #62 and this branch is a leftover pointer at the same tree.
**The material consequence: `main` is currently red.** The 80 lint
findings I reported earlier were measured on this branch's content, which
is byte-for-byte `main`'s content. So `make check` fails on `main` today,
and therefore so does `.gitea/workflows/check.yml` and `docker build .`:
- `wsl_v5` 60, `sqlclosecheck` 10, `gosec` 4, `prealloc` 3, `revive` 3
- `make test` and `make fmt-check` are green; only `make lint` is red
Remediation continues against `main` directly on a new branch,
`lint-remediation-final`, which will get its own PR closing #61 and #59.
This PR and the `golangci-v2.12.2` branch are being retired.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Finishes the lint remediation tracked in #61, which in turn unblocks #59
(both files from #59's definition of done are already on
main; #59 staysopen only because
make checkis red under the canonical config).What this branch does
Chunk 2 of the remediation, on top of the mechanical chunk 1 already on
main. Behavior-preserving throughout:err113: dynamic errors replaced with package-level sentinels and%wwrapping; direct comparisons converted to
errors.Isgoprintffuncname: printf-style helpers renamed with anfsuffix(
ui.Writermessage methods,cli.ReportErrorf,database.Fatalf,vaultik
stdoutf) and all call sites updatedrevive: stuttering type names renamed (blob.Handler,blob.WithReader,blob.ChunkPosition,storage.URL,storage.Info),doc comments and package comments added, unused parameters blanked
contextcheck/noctx:ctxthreaded throughblob.Packer(
AddChunk/Flush/FinalizeBlob/PackChunks) and scanner call sitesfunlen/cyclop/gocognit/nestif/dupl: oversized or duplicatedfunctions split into focused helpers
paralleltest/tparallel/thelper/usetesting/testpackage: testsparallelized where safe, helpers marked,
t.TempDiradoptedgosec: integer conversions clamped or justified; remaining findingssuppressed with per-site justifications
log.LogOptionsalias (callers migrated tolog.Options).golangci.yml,Dockerfile, andMakefileon this branch arebyte-identical to
main— the canonical config (sha256021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb) isnot modified here.
Current state: NOT green
make checkon this branch exits 2.make testandmake fmt-checkpass(all 14 packages
ok), butmake lintstill reports 80 findings:wsl_v5: 60sqlclosecheck: 10gosec: 4prealloc: 3revive: 3Note that commit
7ae470e's message asserts "make check is green"; thatassertion does not hold as of this branch tip. Labeled
needs-checksuntil the remaining 80 are fixed.
Closing this PR as empty — correcting my own earlier analysis.
origin/golangci-v2.12.2andorigin/mainhave identical treehashes:
git diff origin/main origin/golangci-v2.12.2is empty. The branchcontributes zero content delta. The "126 changed files / 8,184
additions" shown on this PR is a merge-base artifact: the branch's merge
base with
mainpredatescc58583, so the three-dot diff replays workthat is already on
main. The chunk-2 remediation landed onmainviaPR #62 and this branch is a leftover pointer at the same tree.
The material consequence:
mainis currently red. The 80 lintfindings I reported earlier were measured on this branch's content, which
is byte-for-byte
main's content. Somake checkfails onmaintoday,and therefore so does
.gitea/workflows/check.ymlanddocker build .:wsl_v560,sqlclosecheck10,gosec4,prealloc3,revive3make testandmake fmt-checkare green; onlymake lintis redRemediation continues against
maindirectly on a new branch,lint-remediation-final, which will get its own PR closing #61 and #59.This PR and the
golangci-v2.12.2branch are being retired.Pull request closed