Skip to content

Skip redundant lint steps via hk ci profile#30

Merged
rblaine95 merged 1 commit into
masterfrom
ci/skip-redundant-hk-steps
Jun 27, 2026
Merged

Skip redundant lint steps via hk ci profile#30
rblaine95 merged 1 commit into
masterfrom
ci/skip-redundant-hk-steps

Conversation

@rblaine95

Copy link
Copy Markdown
Member

Summary

The Lint workflow already runs cargo clippy and cargo fmt --check as
dedicated steps, then invokes hk check --all. Previously the redundant
re-runs were suppressed with a one-off --skip-step flag (and a second flag
was being added for cargo_clippy/cargo_format), scattering CI-only policy
across the workflow where it could drift from hk.pkl.

This PR moves that policy into hk.pkl as a reusable ci profile:

  • cargo_clippy, cargo_format, and no_commit_protected_branch are tagged
    profiles = List("!ci") — they still run locally (pre-commit / hk check),
    but are disabled when the ci profile is active.
  • The workflow now runs hk check --all --profile ci, keeping the skip policy
    in one declarative place.

Why each step is skipped in CI

  • cargo_clippy / cargo_format — run as dedicated workflow steps already;
    hk re-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 --plan confirms the gating:

Step --profile ci no profile
cargo_clippy ○ disabled by active profile ✓ 490 files
cargo_format ○ disabled by active profile ✓ 490 files
no_commit_protected_branch ○ disabled by active profile ✓ 727 files
  • hk validate passes.
  • hk check --all --profile ci exits 0 (runs pkl_format + pkl_lint over
    the edited hk.pkl and actionlint over the workflow).
  • Local pre-commit run shows no_commit_protected_branch still executes without
    the profile, so developer-side behavior is unchanged.

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
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@rblaine95, we couldn't start this review because you've reached your PR review rate limit.

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 @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 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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 58470443-3780-47dc-b9ac-9e3bf464d4c2

📥 Commits

Reviewing files that changed from the base of the PR and between c364b30 and bc6ebd3.

⛔ Files ignored due to path filters (1)
  • hk.pkl is excluded by !**/*.pkl
📒 Files selected for processing (1)
  • .github/workflows/lint.yml

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.

❤️ Share

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

@rblaine95 rblaine95 merged commit 5cd9fac into master Jun 27, 2026
6 of 8 checks passed
@rblaine95 rblaine95 deleted the ci/skip-redundant-hk-steps branch June 27, 2026 08: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