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
chore: eliminate every self-scan waiver by fixing root causes
All 11 waivers in .codeguard/codeguard.yaml are gone; the self-scan now
runs with zero suppressions:
- 2 were dead: features_test.go shrank below the file-lines budget, and
ci.test-without-assertion natively exempts TestMain(*testing.M) blocks
- quality.max-file-lines on catalog_quality.go: split the 16 quality.ai.*
entries into catalog_quality_ai.go (486 -> 258 lines)
- performance.unbounded-goroutines-in-loop x3: the rule now recognizes
bounded worker-pool construction - counted loops (bare 'for range n',
'i < n' with literal/identifier bounds; len()/cap() stays data-driven
and still fires) and loops acquiring a struct{} channel semaphore
before launching
- performance.go.sleep-in-loop: _test.go files are exempt; polling with
a short sleep between readiness probes is the idiomatic test pattern
- 4 tree-sitter-spike waivers: replaced by a single exclude for the
spike directory, an isolated nested module excluded from the build
Rule changes are covered by new positive and negative tests and
documented in the Performance precision notes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
reason: the tree-sitter design spike is an isolated Go module whose differential tests must live beside the prototype they validate (docs/treesitter-spike.md)
-`unbounded-goroutines-in-loop` recognizes bounded worker-pool construction and stays silent for it: counted loops (`for range n` with no iteration variables, or `for i := 0; i < n; i++` with a literal/identifier bound — `len()`/`cap()` bounds stay data-driven and still fire) and loops whose body acquires a `struct{}` channel semaphore (`sem <- struct{}{}`) before launching.
464
+
-`go.sleep-in-loop` exempts `_test.go` files: polling with a short sleep between readiness probes is the idiomatic test pattern.
463
465
-`regex-compile-in-loop` fires only on **literal** patterns: compiling a variable pattern in a loop usually means the pattern differs per iteration (e.g. compiling config-supplied patterns), which is not hoistable.
464
466
-`defer-in-loop` scopes to the enclosing function: `defer wg.Done()` inside a goroutine launched from a loop runs per goroutine and is not flagged.
465
467
-`await-in-loop` exempts `for await` streams and any file using a concurrency limiter (`p-limit`/`p-queue`); keep the loop (or disable the toggle) when iterations genuinely depend on each other.
0 commit comments