Skip to content

Commit 3916130

Browse files
committed
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.
1 parent 2bfacef commit 3916130

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.cursor/rules/coding.mdc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
alwaysApply: true
3+
description: Cursor Coding Rules
4+
---
5+
6+
# Coding Rules
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 file
21+
./gradlew spotlessApply apiDump
22+
23+
# Run tests and lint
24+
./gradlew check
25+
26+
# Run unit tests
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. Use Kotlin only for test code and Android modules which already use Kotlin, otherwise use Java
36+
5. New features should be opt-in by default, extend `SentryOptions` with getters and setters to enable/disable a new feature
37+
6. Consider backwards compatibility
38+
7. Before implementing a feature or a fix, create a new branch off the `main` branch, the branch name should have the following pattern: `markushi/[feat|fix]/branch-name`
39+
40+
## Coding rules
41+
42+
1. First think through the problem, read the codebase for relevant files, and propose a plan
43+
2. Before you begin working, check in with me and I will verify the plan
44+
3. Then, begin working on the todo items, marking them as complete as you go
45+
4. Please every step of the way just give me a high level explanation of what changes you made
46+
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.
47+
6. Once you're done, format the code and regenerate the .api files using the following command `./gradlew spotlessApply apiDump`
48+
7. As a last step, do a git commit
49+
50+
51+
## Useful Resources
52+
53+
- Main SDK documentation: https://develop.sentry.dev/sdk/overview/
54+
- Internal contributing guide: https://docs.sentry.io/internal/contributing/
55+
- Git commit messages conventions: https://develop.sentry.dev/engineering-practices/commit-messages/

0 commit comments

Comments
 (0)