Skip to content

chore(cursor): Add Rust formatting check to Cursor rules#2696

Closed
HazAT wants to merge 1 commit intomasterfrom
chore/add-rust-fmt-to-cursor-rules
Closed

chore(cursor): Add Rust formatting check to Cursor rules#2696
HazAT wants to merge 1 commit intomasterfrom
chore/add-rust-fmt-to-cursor-rules

Conversation

@HazAT
Copy link
Copy Markdown
Member

@HazAT HazAT commented Aug 10, 2025

Summary

  • Added cargo fmt --all -- --check command to the Cursor rules file
  • Ensures consistent Rust code formatting before committing changes
  • Helps maintain code quality standards across the project

Test plan

  • Updated .cursor/rules/sentry-cli-project.mdc with formatting requirement
  • Verified the formatting command syntax is correct

🤖 Generated with Claude Code

Add cargo fmt --all -- --check to the Cursor rules file to ensure
consistent Rust code formatting before committing changes.
@HazAT HazAT requested review from a team and szokeasaurusrex as code owners August 10, 2025 19:21

## Code Formatting

- Always run `cargo fmt --all -- --check` before committing to ensure consistent Rust code formatting
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We already run cargo fmt --all -- --check to verify correct formatting in CI, so there is no need for the LLM to verify it before committing.

However, running cargo fmt --all, which actually fixes formatting rather than just validating it, could in fact be useful:

Suggested change
- Always run `cargo fmt --all -- --check` before committing to ensure consistent Rust code formatting
- Always run `cargo fmt --all` before committing to ensure consistent Rust code formatting

I would also suggest placing this line in .cursor/rules/rust-development.mdc, as it is only relevant to Rust development.

@szokeasaurusrex
Copy link
Copy Markdown
Member

Closing in favor of #2721

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.

2 participants