Skip to content

Releases: malikov73/flakylint

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 19 Jul 08:12

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.
  • version command: flakylint version (also --version / -version) prints
    the build version, commit, and date, falling back to
    runtime/debug.ReadBuildInfo when built without release ldflags.

Changed

  • Autofix safety: suggested fixes are no longer offered when they would corrupt
    the source. httptestclose keeps the diagnostic but drops the fix inside
    if/for/switch statement initializers; exitfatal suppresses its fix when
    the testing receiver name is shadowed at the call site.
  • Precision narrowing from corpus evaluation and an external audit:
    hardport validates the network argument and port range and no longer flags
    http.Server{Addr:} literals; eventuallyeffect ignores channels declared
    inside the callback; maporder is 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.0 in CI installs (rather than
    @latest) so a future release does not change results unexpectedly.

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 17 Jul 13:43

Full Changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 17 Jul 06:02

flakylint v0.1.0 — initial release

Four conservative go/analysis checks for flaky-test patterns in Go:

  • httptestclosehttptest.NewServer never closed (leaked port/goroutines); autofix inserts t.Cleanup(srv.Close)
  • sleepasserttime.Sleep in a test body instead of synchronization; suggests testing/synctest (Go 1.24+)
  • parallelglobal — writes to package-level variables in t.Parallel() tests
  • exitfatalos.Exit / log.Fatal in tests (skips cleanup); autofix rewrites log.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