Update golangci-lint to v2.12.2 with canonical config #2
Reference in New Issue
Block a user
Delete Branch "clawbot/bsdaily:golangci-v2.12.2"
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?
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.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.