Releases: malikov73/flakylint
Releases · malikov73/flakylint
Release list
v0.2.0
Added
- Three new checks, enabled by default:
hardport— hardcoded TCP/UDP ports in test listeners.maporder— assertions that depend on map-iteration order.eventuallyeffect— count-dependent side effects inside polling callbacks.
versioncommand:flakylint version(also--version/-version) prints
the build version, commit, and date, falling back to
runtime/debug.ReadBuildInfowhen built without release ldflags.
Changed
- Autofix safety: suggested fixes are no longer offered when they would corrupt
the source.httptestclosekeeps the diagnostic but drops the fix inside
if/for/switchstatement initializers;exitfatalsuppresses its fix when
the testing receiver name is shadowed at the call site. - Precision narrowing from corpus evaluation and an external audit:
hardportvalidates the network argument and port range and no longer flags
http.Server{Addr:}literals;eventuallyeffectignores channels declared
inside the callback;maporderis now source-order aware and ignores
per-iteration accumulators used only as testify message arguments.
Upgrade notes
- The new default-enabled checks may surface findings in downstream CI that
previous versions did not report. Pin@v0.2.0in CI installs (rather than
@latest) so a future release does not change results unexpectedly.
v0.1.1
v0.1.0
flakylint v0.1.0 — initial release
Four conservative go/analysis checks for flaky-test patterns in Go:
- httptestclose —
httptest.NewServernever closed (leaked port/goroutines); autofix insertst.Cleanup(srv.Close) - sleepassert —
time.Sleepin a test body instead of synchronization; suggeststesting/synctest(Go 1.24+) - parallelglobal — writes to package-level variables in
t.Parallel()tests - exitfatal —
os.Exit/log.Fatalin tests (skips cleanup); autofix rewriteslog.Fatal*→t.Fatal*
Field-tested before release: 0 false positives across 104 hand-triaged findings on kubernetes, grafana, prometheus, and testcontainers-go — see docs/corpus.
Install: go install github.com/malikov73/flakylint/cmd/flakylint@v0.1.0