Adopt the Whitaker Dylint suite in the lint gate and CI - #89
Conversation
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.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. 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 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: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
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
lintMakefile 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
ctemodule exceeded the 400-linemodule_max_linesceiling, so its unit tests moved to a siblingsrc/cte_tests.rssubmodule, and four in-filetestsmodules gained the//!inner doc comments required bymodule_must_have_inner_docs. Nodylint.tomlexclusions were needed.Review walkthrough
Makefile: adds theWHITAKER ?= whitakertool variable and appendsRUSTFLAGS="$(RUST_FLAGS)" $(WHITAKER) --all -- $(CARGO_FLAGS)to thelinttarget..github/workflows/ci.yml: pinsWHITAKER_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 withoutcargo binstall.src/cte.rsandsrc/cte_tests.rs: the inlinetestsmodule becomes a#[cfg(test)] #[path = "cte_tests.rs"]sibling submodule, bringingcte.rsto 289 lines.src/builders.rs,src/columns.rs,src/connection_ext.rs,src/macros.rs: eachtestsmodule 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-featuresexits 0).make testandmake test-prepare-pg-worker— full suite passes, including the embedded PostgreSQL integration tests and trybuild UI contracts.make markdownlintandmake nixie— pass.🤖 Generated with Claude Code