Allow no_expect_outside_tests pending whitaker#311 - #156
Conversation
Whitaker rolling suite build 4e8a8ab (from leynos/whitaker commit 4e8a8ab6, PR #238) regressed the #[cfg(test)] companion-module exemption in no_expect_outside_tests: expect() calls inside helper and fixture functions under src/**/tests/ are now flagged as "outside test-only code" even though the enclosing module is declared #[cfg(test)]. The previous suite build (2bc0c3f, v0.2.7) linted the same code clean, and the rolling release no longer serves older artefacts, so every CI run now fails the lint gate with 22 false positives. Allow the single affected lint in the Whitaker invocation until leynos/whitaker#311 is fixed, keeping the rest of the suite and Clippy denying warnings as before. A TODO beside the flag records the revert condition.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e85e5a3d31
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # rolling suite build 4e8a8ab regressed the #[cfg(test)] companion-module | ||
| # exemption and flags expect() calls in test-only helper functions under | ||
| # src/**/tests/. | ||
| RUSTFLAGS="$(RUST_FLAGS) -A no_expect_outside_tests" $(WHITAKER) --all -- $(CARGO_FLAGS) |
There was a problem hiding this comment.
Keep the expect lint enabled outside tests
This command-line allowance applies to every target Whitaker checks, not only the #[cfg(test)] companion modules producing false positives. Consequently, newly introduced expect() calls in production code or shared fixtures can pass this part of the lint gate as well. Keep the lint strict by pinning the last working Whitaker suite or narrowly exempting only the affected test modules rather than disabling the lint for the whole invocation.
AGENTS.md reference: AGENTS.md:L273-L275
Useful? React with 👍 / 👎.
Summary
Temporarily allows the
no_expect_outside_testsWhitaker lint in the lintgate, pending leynos/whitaker#311.
Rolling suite build
4e8a8ab(from leynos/whitaker commit4e8a8ab6,PR leynos/whitaker#238) regressed the
#[cfg(test)]companion-moduleexemption:
expect()calls inside helper and fixture functions undersrc/**/tests/are now flagged as "outside test-only code" even though theenclosing module is declared
#[cfg(test)]. Suite build2bc0c3f(v0.2.7)linted the same code clean, and the rolling release no longer serves older
artefacts, so every CI run fails the lint gate with 22 false positives
(see run 30115224258).
Review walkthrough
One-line change to the
linttarget in the Makefile, appending-A no_expect_outside_teststoRUSTFLAGSfor the Whitaker invocationonly. Clippy and the rest of the suite keep denying warnings. A TODO
records the revert condition (leynos/whitaker#311).
Validation
CI on this pull request exercises the lint gate with the allowance in
place.