feat(core): report examined counts for the three sibling directory rules - #410
Conversation
|
Warning Review limit reached
Next review available in: 17 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
architecture/reserved-directory-names, architecture/directory-naming and architecture/unit-entry-file now call RuleContext.recordExamined, matching architecture/reserved-name-placement's existing behavior. Each rule's declaration identity is its own bare glob key, keyed identically to what its project-scoped diagnostic already names.
4c97187 to
6a6ac3b
Compare
Fixes #387. Stacked on #409 (base:
fix/386-any-case-unit-scopes) — the counts must handle the third option map #409 adds; GitHub will retarget this PR tomainwhen #409 merges.Summary
architecture/reserved-name-placementreports per-declaration examined counts; its three glob-configured siblings (reserved-directory-names,directory-naming,unit-entry-file) never calledrecordExamined, so a run configuring all four yielded counts for one rule and silence for three. Per the issue, each rule needed its own small spec of what one "examined" unit is — shipped as three definitions grounded in each rule's own diagnostics:unitScopes+anyCaseUnitScopes), both maps' work sums under the shared bare-glob label, consistent with how the diagnostics already name that string regardless of source map (pinned: shared label reads 2 across one capitalised + one lowercase unit).decodeSegment→ undefined) was matched but never judged against a casing — not counted. A letterless name (2024) vacuously passes casing and is counted; only the decode-failure path is excluded (pinned).unitsbeatspascalCaseUnitswhere both match — pinned).Cross-cutting, per the examined-counts design:
--routeruns (nosourceFilesinventory) produce no entry (the rules' existing early return sits above the counting); counts are unfiltered by--diff/baseline by construction (recorded insidecheck()); empty-value keys are seeded at 0 (identity is the map key, which the diagnostics also name); override-only keys stay invisible, matching each rule's existing diagnostics scope. The empty-entry vs no-entry distinction is asserted withObject.hasOwn+toEqual({}), not a filtered subset.Verification
engine.test.ts.pnpm -r typecheck/pnpm test(core 1346, cli 846, vite 209) /pnpm lintall green.@svelte-vitals/coreminor (JSON-only surface). No engine/rule.tschanges needed. Per-rule doc-page mentions of the counts can follow if wanted — theexaminedmap is documented generically today.🤖 Generated with Claude Code