Skip to content

feat: format + clippy in ci#14

Open
Dodecahedr0x wants to merge 6 commits intomainfrom
feat/clippy-ci
Open

feat: format + clippy in ci#14
Dodecahedr0x wants to merge 6 commits intomainfrom
feat/clippy-ci

Conversation

@Dodecahedr0x
Copy link

@Dodecahedr0x Dodecahedr0x commented Feb 26, 2026

Summary by CodeRabbit

  • Chores
    • Enhanced code quality assurance with automated format and lint checks in CI/CD pipeline.
    • Updated development toolchain to use stable Rust version.
    • Established standardized code formatting configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

Warning

Rate limit exceeded

@Dodecahedr0x has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 47 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6d6ea3b and 630680a.

📒 Files selected for processing (9)
  • .github/workflows/ci.yml
  • e-token/src/processor/create_ephemeral_ata_permission.rs
  • e-token/src/processor/delegate_ephemeral_ata_permission.rs
  • e-token/src/processor/deposit_spl_tokens.rs
  • e-token/src/processor/initialize_ephemeral_ata.rs
  • e-token/src/processor/initialize_global_vault.rs
  • e-token/src/processor/reset_ephemeral_ata_permission.rs
  • e-token/src/processor/undelegate_ephemeral_ata.rs
  • e-token/src/processor/withdraw_spl_tokens.rs

Walkthrough

The PR introduces standardized Rust tooling configuration by adding a CI lint job for formatting and linting checks, updating the toolchain to use a stable release channel, removing explicit nightly toolchain specifications from workspace metadata, and establishing rustfmt configuration standards.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/ci.yml
Adds new "fmt + clippy" lint job with checkout, Rust setup, cargo registry/target caching, and verification steps. Adjusts branch filter spacing for push and pull_request triggers.
Rust Tooling Configuration
rust-toolchain.toml, rustfmt.toml
Updates Rust toolchain channel from fixed version 1.86.0 to "stable". Adds rustfmt configuration including edition, max_width, indentation, and newline style settings.
Workspace Manifest
Cargo.toml
Removes workspace.metadata.toolchains block containing explicit nightly toolchain declarations. Minor formatting adjustments to dependency declarations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: format + clippy in ci' accurately summarizes the main change: adding rustfmt and clippy linting checks to the CI pipeline in .github/workflows/ci.yml.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/clippy-ci

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 19-23: The GitHub Actions step named "Set up Rust from
rust-toolchain.toml" is misleading because the action is explicitly passed
toolchain: stable; update the step either by renaming the step title to "Set up
Rust toolchain" or by removing the explicit toolchain: stable input so the
dtolnay/rust-toolchain action can read the rust-toolchain.toml; locate the step
using the uses: dtolnay/rust-toolchain@stable and change the name or delete the
toolchain: stable line accordingly.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52131d6 and c2ba5e4.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • e-token/src/processor/initialize_ephemeral_ata.rs
  • e-token/src/processor/initialize_global_vault.rs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 19-26: CI is setting the Rust toolchain to "stable"
(dtolnay/rust-toolchain@stable and rustup component add ... --toolchain stable)
while the workspace metadata requires nightly-2025-02-16 for format and lint;
update the workflow to use the configured nightly toolchain (e.g., set toolchain
to nightly-2025-02-16 in the dtolnay/rust-toolchain step and use rustup
component add --toolchain nightly-2025-02-16 to install rustfmt and clippy) so
CI formatting/linting matches the workspace configuration.
- Around line 25-26: Remove the redundant workflow step named "Ensure rustfmt
and clippy are installed" that runs `rustup component add rustfmt clippy
--toolchain stable` because the dtolnay/rust-toolchain action already installs
those components via its `components: rustfmt, clippy` configuration; delete
that step block from the GitHub Actions job so the workflow relies on the
existing rust-toolchain action instead.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c2ba5e4 and 40e9c58.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • Cargo.toml

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/ci.yml (1)

25-26: ⚠️ Potential issue | 🟡 Minor

Remove redundant component installation step.

Line 25–26 duplicates what the dtolnay/rust-toolchain step already requests via components: rustfmt, clippy.

♻️ Proposed fix
       - name: Set up Rust toolchain
         uses: dtolnay/rust-toolchain@stable
         with:
           toolchain: stable
           components: rustfmt, clippy

-      - name: Ensure rustfmt and clippy are installed
-        run: rustup component add rustfmt clippy --toolchain stable
-
       - name: Cache cargo registry
         uses: actions/cache@v4
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 25 - 26, Remove the redundant step
named "Ensure rustfmt and clippy are installed" that runs `rustup component add
rustfmt clippy --toolchain stable`; the dtolnay/rust-toolchain step already
declares components: rustfmt, clippy, so delete this entire run step (look for
the step with the name Ensure rustfmt and clippy are installed) to avoid
duplicating component installation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 50-51: The CI clippy step ("Run clippy") currently runs "cargo
clippy --workspace -- -D warnings" which skips tests/examples/benches/binaries;
update the command invoked by the Run clippy step to include the --all-targets
flag so it runs clippy across all targets (tests, benches, examples, binaries)
in addition to the workspace and -D warnings options.

---

Duplicate comments:
In @.github/workflows/ci.yml:
- Around line 25-26: Remove the redundant step named "Ensure rustfmt and clippy
are installed" that runs `rustup component add rustfmt clippy --toolchain
stable`; the dtolnay/rust-toolchain step already declares components: rustfmt,
clippy, so delete this entire run step (look for the step with the name Ensure
rustfmt and clippy are installed) to avoid duplicating component installation.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40e9c58 and 6d6ea3b.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • Cargo.toml
  • rust-toolchain.toml
  • rustfmt.toml

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