Skip to content

Adopt the Whitaker Dylint suite in the lint gate and CI - #89

Merged
leynos merged 3 commits into
mainfrom
adopt-whitaker
Jul 9, 2026
Merged

Adopt the Whitaker Dylint suite in the lint gate and CI#89
leynos merged 3 commits into
mainfrom
adopt-whitaker

Conversation

@leynos

@leynos leynos commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

This change adopts the Whitaker Dylint suite (v0.2.5) in the repository's lint gate and CI as part of the estate-wide rollout (see leynos/netsuke#410 for the reference adoption). The lint Makefile target now runs the suite after Clippy with warnings denied, and the CI workflow installs the suite (cached, with a binstall-or-build fallback) before the lint step.

Two rounds of findings were fixed ahead of the wiring: the cte module exceeded the 400-line module_max_lines ceiling, so its unit tests moved to a sibling src/cte_tests.rs submodule, and four in-file tests modules gained the //! inner doc comments required by module_must_have_inner_docs. No dylint.toml exclusions were needed.

Review walkthrough

  • Makefile: adds the WHITAKER ?= whitaker tool variable and appends RUSTFLAGS="$(RUST_FLAGS)" $(WHITAKER) --all -- $(CARGO_FLAGS) to the lint target.
  • .github/workflows/ci.yml: pins WHITAKER_INSTALLER_VERSION: '0.2.5', caches the installer and the cargo-binstall cache, and installs the suite before the lint step with a build-from-source fallback for runners without cargo binstall.
  • src/cte.rs and src/cte_tests.rs: the inline tests module becomes a #[cfg(test)] #[path = "cte_tests.rs"] sibling submodule, bringing cte.rs to 289 lines.
  • src/builders.rs, src/columns.rs, src/connection_ext.rs, src/macros.rs: each tests module now opens with a //! doc comment.

Validation

  • mbake validate Makefile — valid syntax.
  • make check-fmt — passes.
  • make lint — Clippy and the Whitaker suite both pass with warnings denied (RUSTFLAGS="-D warnings" whitaker --all -- --all-targets --all-features exits 0).
  • make test and make test-prepare-pg-worker — full suite passes, including the embedded PostgreSQL integration tests and trybuild UI contracts.
  • make markdownlint and make nixie — pass.

🤖 Generated with Claude Code

leynos added 2 commits July 8, 2026 13:00
Prepare the crate for the Whitaker Dylint suite:

- Move the `cte` unit tests into a sibling `src/cte_tests.rs`
  submodule via `#[path]`, bringing `src/cte.rs` under the
  400-line `module_max_lines` ceiling.
- Add `//!` inner doc comments to the `tests` modules in
  `builders`, `columns`, `connection_ext`, and `macros` to satisfy
  `module_must_have_inner_docs`.

No behavioural change; test coverage is unchanged.
Extend the `lint` Makefile target to run the Whitaker Dylint suite
after Clippy, denying warnings via the existing `RUST_FLAGS`
convention, and introduce a `WHITAKER ?= whitaker` tool variable
alongside the other tool overrides.

In CI, install the suite before the lint step: pin
`WHITAKER_INSTALLER_VERSION` as job env, cache the installer binary
and the cargo-binstall cache keyed on OS, architecture, and version,
and install via `cargo binstall` with a build-from-source fallback
for runners without binstall. This mirrors the estate-wide rollout
established in leynos/netsuke#410.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 59 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5eeb5a0d-3405-4f98-911c-a3243be19947

📥 Commits

Reviewing files that changed from the base of the PR and between 1457bb1 and 9130d48.

📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • Makefile
  • src/builders.rs
  • src/columns.rs
  • src/connection_ext.rs
  • src/cte.rs
  • src/cte_tests.rs
  • src/macros.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch adopt-whitaker

Comment @coderabbitai help to get the list of available commands.

codescene-access[bot]

This comment was marked as outdated.

Replace inline `${{ env.WHITAKER_INSTALLER_VERSION }}` interpolation in the
run block with the plain shell variable `"${WHITAKER_INSTALLER_VERSION}"`;
the job-level `env:` already exports it, and zizmor flags run-block template
interpolation as a template-injection hazard. Add `--locked` to the
cargo-binstall invocation so that binstall's compile fallback resolves
dependencies from the published lockfile, keeping fallback builds
reproducible.
@leynos
leynos merged commit 656cb25 into main Jul 9, 2026
6 checks passed
@leynos
leynos deleted the adopt-whitaker branch July 9, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant