Remaining //nolint directives, each justified inline: gosec G204 for the sqlite3/zstdmt/zstdcat/head subprocesses (internally constructed paths and fixed arguments), and unqueryvet for the intentional full-row SELECT * copies whose schema is defined by the source database.
TODO.md Completed Steps updated. make check is green.
Adds the canonical `.golangci.yml` (v2 layout, `default: all` with the standard disable list) and pins golangci-lint v2.12.2 everywhere it is referenced.
## Version pins
- `Makefile` `deps` target: `go install` now uses `github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2`, replacing `@latest` on the old v1 module path.
- `Dockerfile` lint stage already pinned `golangci/golangci-lint:v2.12.2-alpine` by digest; unchanged.
- `script/bootstrap` installs golangci-lint via the system package manager (nix/brew/apk) and carries no version pin; unchanged.
## Lint fixes
The repo previously had no `.golangci.yml`, so the strict config surfaced 174 issues, all fixed with no behavior changes:
- `err113` (12): wrapped static sentinel errors instead of dynamic `fmt.Errorf`
- `gocognit`/`funlen`/`nestif`: split `ExtractDay`, `Run`, `DumpAndCompress`, `VerifyOutput`, and CLI date parsing into smaller helpers
- `noctx` (10): `ExecContext`/`QueryContext`/`QueryRowContext`/`BeginTx` and `exec.CommandContext`
- `noinlineerr` (42) and `wsl_v5` (46)/`nlreturn` (16): statement layout fixes
- `lll` (24): wrapped long lines and SQL strings
- `gosec` (11): `filepath.Clean` on opens/creates, bounded `uint64` conversion in `CheckFreeSpace`, named output-dir permission constant
- `mnd` (4): `unix.FADV_SEQUENTIAL`/`unix.FADV_WILLNEED` and named constants
- `revive` (11): package and exported symbol comments
- `testpackage`/`paralleltest`: smoke test moved to `bsdaily_test` with `t.Parallel()`
- `nonamedreturns` (2), `unqueryvet` (7), `gochecknoglobals` (1)
Remaining `//nolint` directives, each justified inline: `gosec` G204 for the sqlite3/zstdmt/zstdcat/head subprocesses (internally constructed paths and fixed arguments), and `unqueryvet` for the intentional full-row `SELECT *` copies whose schema is defined by the source database.
`TODO.md` Completed Steps updated. `make check` is green.
Add the canonical .golangci.yml (v2 layout, default: all with the
standard disable list) and pin golangci-lint v2.12.2 in the Makefile
deps target using the v2 module path, replacing the @latest install on
the old v1 path. The Dockerfile lint stage already pinned the v2.12.2
alpine image by digest and is unchanged.
Fix all issues surfaced by the strict config:
- err113: introduce wrapped static sentinel errors
- gocognit/funlen/nestif: split ExtractDay, Run, DumpAndCompress,
VerifyOutput, and the CLI flag parsing into smaller helpers
- noctx: use ExecContext/QueryContext/BeginTx and CommandContext
- noinlineerr: replace inline if-err assignments with plain ones
- wsl_v5/nlreturn: add required blank lines
- lll: wrap long lines and SQL strings
- gosec: filepath.Clean on file open/create; bounded uint64
conversion in CheckFreeSpace; named output dir permission constant
- mnd: use unix.FADV_* constants and named size constants
- revive: add package and exported symbol comments
- testpackage/paralleltest: move smoke test to bsdaily_test with
t.Parallel()
- nonamedreturns: drop non-error named returns
The remaining nolint directives (gosec subprocess launches with
internal paths, unqueryvet full-row SELECT * copies whose schema is
defined by the source database) are each justified inline.
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.
Adds the canonical
.golangci.yml(v2 layout,default: allwith the standard disable list) and pins golangci-lint v2.12.2 everywhere it is referenced.Version pins
Makefiledepstarget:go installnow usesgithub.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2, replacing@lateston the old v1 module path.Dockerfilelint stage already pinnedgolangci/golangci-lint:v2.12.2-alpineby digest; unchanged.script/bootstrapinstalls golangci-lint via the system package manager (nix/brew/apk) and carries no version pin; unchanged.Lint fixes
The repo previously had no
.golangci.yml, so the strict config surfaced 174 issues, all fixed with no behavior changes:err113(12): wrapped static sentinel errors instead of dynamicfmt.Errorfgocognit/funlen/nestif: splitExtractDay,Run,DumpAndCompress,VerifyOutput, and CLI date parsing into smaller helpersnoctx(10):ExecContext/QueryContext/QueryRowContext/BeginTxandexec.CommandContextnoinlineerr(42) andwsl_v5(46)/nlreturn(16): statement layout fixeslll(24): wrapped long lines and SQL stringsgosec(11):filepath.Cleanon opens/creates, boundeduint64conversion inCheckFreeSpace, named output-dir permission constantmnd(4):unix.FADV_SEQUENTIAL/unix.FADV_WILLNEEDand named constantsrevive(11): package and exported symbol commentstestpackage/paralleltest: smoke test moved tobsdaily_testwitht.Parallel()nonamedreturns(2),unqueryvet(7),gochecknoglobals(1)Remaining
//nolintdirectives, each justified inline:gosecG204 for the sqlite3/zstdmt/zstdcat/head subprocesses (internally constructed paths and fixed arguments), andunqueryvetfor the intentional full-rowSELECT *copies whose schema is defined by the source database.TODO.mdCompleted Steps updated.make checkis green.Pull request closed