Skip redundant lint steps via hk ci profile#30
Conversation
The lint workflow runs `cargo clippy` and `cargo fmt --check` as
dedicated steps and then invokes `hk check --all`. Suppressing the
redundant re-runs through three repeated `--skip-step` flags worked
but scattered CI-only policy across the workflow, prone to drifting
from `hk.pkl`.
Define the skips declaratively instead: tag `cargo_clippy`,
`cargo_format`, and `no_commit_protected_branch` with
`profiles = List("!ci")` so they still run locally but are disabled
under the `ci` profile. The workflow now runs
`hk check --all --profile ci`, keeping the skip policy in one place
and matching the dedicated clippy and fmt steps that precede it.
Glory to the Omnissiah
|
Warning Review limit reached
More reviews will be available in 21 minutes and 28 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?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 credits. 🚦 How do rate 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 see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
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 |
Summary
The
Lintworkflow already runscargo clippyandcargo fmt --checkasdedicated steps, then invokes
hk check --all. Previously the redundantre-runs were suppressed with a one-off
--skip-stepflag (and a second flagwas being added for
cargo_clippy/cargo_format), scattering CI-only policyacross the workflow where it could drift from
hk.pkl.This PR moves that policy into
hk.pklas a reusableciprofile:cargo_clippy,cargo_format, andno_commit_protected_branchare taggedprofiles = List("!ci")— they still run locally (pre-commit /hk check),but are disabled when the
ciprofile is active.hk check --all --profile ci, keeping the skip policyin one declarative place.
Why each step is skipped in CI
cargo_clippy/cargo_format— run as dedicated workflow steps already;hkre-running them roughly doubled the lint job for no added coverage.no_commit_protected_branch— CI legitimately runs on protected branches.Verification
hk check --all --planconfirms the gating:--profile cicargo_clippy○ disabled by active profile✓ 490 filescargo_format○ disabled by active profile✓ 490 filesno_commit_protected_branch○ disabled by active profile✓ 727 fileshk validatepasses.hk check --all --profile ciexits0(runspkl_format+pkl_lintoverthe edited
hk.pklandactionlintover the workflow).no_commit_protected_branchstill executes withoutthe profile, so developer-side behavior is unchanged.