You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.golangci.yml is v1 format and does not load under golangci-lint v2 #19
The lint config .golangci.yml is in the golangci-lint v1 format. CI pins golangci-lint v1.61.0 so CI itself is fine, but a locally installed golangci-lint v2.x refuses it:
Error: can't load config: unsupported version of the configuration: ""
So anyone on a current golangci-lint cannot run the repo lint locally, and the day CI bumps to v2 the config has to be migrated anyway.
The same config also disables staticcheck, unused, govet, gosimple, gocritic and gosec "due to version compatibility". Re-enabling at least staticcheck and unused after the migration would catch a few small things I noticed while doing the #17 follow-up (see #18):
SendMetrics(data interface{}) can be any (gthulhu.go).
lessQueuedTask uses a.QueuedTask.Pid where a.Pid works (embedded field, staticcheck QF1008).
the init registration has a dead fallback: if sliceNsDefault == 0 && config.Scheduler.SliceNsDefault > 0 runs right after sliceNsDefault = config.Scheduler.SliceNsDefault, so it never fires, and its comment mentions a "SimpleScheduler" config that does not exist. (gthulhu.go, around line 17 to 26)
Suggested fix
Run golangci-lint migrate to move .golangci.yml to the v2 schema, re-enable staticcheck and unused, and fix what they flag (the three above). None of this is on the scheduling hot path.
Activity