Skip to content

Commit 88f8434

Browse files
authored
feat(dev): Add Cursor IDE coding rules configuration (#4558)
* feat(dev): Add Cursor IDE coding rules configuration Adds coding rules configuration for Cursor IDE that includes: - Project overview and tech stack information - Key gradle commands for development workflow - Contributing guidelines and coding standards - Development process and formatting requirements This helps maintain consistency in the development environment and provides quick reference for common project commands. * Update coding.mdc * Refine coding.mdc
1 parent 514ac01 commit 88f8434

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.cursor/rules/coding.mdc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
alwaysApply: true
3+
description: Cursor Coding Rules
4+
---
5+
6+
# Contributing Rules for Agents
7+
8+
## Overview
9+
10+
sentry-java is the Java and Android SDK for Sentry. This repository contains the source code and examples for SDK usage.
11+
12+
## Tech Stack
13+
14+
- **Language**: Java and Kotlin
15+
- **Build Framework**: Gradle
16+
17+
## Key Commands
18+
19+
```bash
20+
# Format code and regenerate .api files
21+
./gradlew spotlessApply apiDump
22+
23+
# Run all tests and linter
24+
./gradlew check
25+
26+
# Run unit tests for a specific file
27+
./gradle ':<module>:testDebugUnitTest' --tests="*<file name>*" --info
28+
```
29+
30+
## Contributing Guidelines
31+
32+
1. Follow existing code style and language
33+
2. Do not modify the API files (e.g. sentry.api) manually, instead run `./gradlew apiDump` to regenerate them
34+
3. Write comprehensive tests
35+
4. New features should always be opt-in by default, extend `SentryOptions` or similar Option classes with getters and setters to enable/disable a new feature
36+
5. Consider backwards compatibility
37+
38+
## Coding rules
39+
40+
1. First think through the problem, read the codebase for relevant files, and propose a plan
41+
2. Before you begin working, check in with me and I will verify the plan
42+
3. Then, begin working on the todo items, marking them as complete as you go
43+
4. Please do not describe every step of the way and just give me a high level explanation of what changes you made
44+
5. Make every task and code change you do as simple as possible. We want to avoid making any massive or complex changes. Every change should impact as little code as possible. Everything is about simplicity.
45+
6. Once you're done, format the code and regenerate the .api files using the following command `./gradlew spotlessApply apiDump`
46+
7. As a last step, git stage the relevant files and propose (but not execute) a single git commit command (e.g. `git commit -m "<git commit message>"`)
47+
48+
49+
## Useful Resources
50+
51+
- Main SDK documentation: https://develop.sentry.dev/sdk/overview/
52+
- Internal contributing guide: https://docs.sentry.io/internal/contributing/
53+
- Git commit messages conventions: https://develop.sentry.dev/engineering-practices/commit-messages/

0 commit comments

Comments
 (0)