Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update .cursorrules about code comments #29219

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

adamleithp
Copy link
Contributor

Problem

Cursor constantly want to remove comments left in code, which is no bueno most of the time.

Changes

Add line about comments in .cursorrules.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR updates the .cursorrules file to instruct AI assistants (specifically Cursor) to respect code comments in the codebase rather than automatically removing them.

  • Added rule in .cursorrules specifying to respect all code comments and only remove them if completely irrelevant after a code change
  • Includes explicit instruction "if unsure, do not remove the comment" to preserve institutional knowledge
  • Addresses a specific problem where Cursor AI was frequently suggesting removal of valuable comments
  • Helps maintain context and documentation within the codebase that might otherwise be lost

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -15,5 +15,6 @@ DO NOT GIVE ME HIGH LEVEL SHIT, IF I ASK FOR FIX OR EXPLANATION, I WANT ACTUAL C
- No need to mention your knowledge cutoff
- No need to disclose you're an AI
- Please respect my formatting preferences when you provide code.
- Please respect all code comments, they're usually there for a reason. Remove them ONLY if they're completely irrelevant after a code change. if unsure, do not remove the comment.
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider capitalizing 'if' at the beginning of the second sentence for consistency with the rest of the document.

@Twixes Twixes merged commit a1744c1 into master Feb 26, 2025
90 checks passed
@Twixes Twixes deleted the adam/cursorrules-add-about-comments branch February 26, 2025 09:36
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.

4 participants