-
-
Notifications
You must be signed in to change notification settings - Fork 468
feat(dev): Add Cursor IDE coding rules configuration #4558
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| --- | ||
| alwaysApply: true | ||
| description: Cursor Coding Rules | ||
| --- | ||
|
|
||
| # Contributing Rules for Agents | ||
|
|
||
| ## Overview | ||
|
|
||
| sentry-java is the Java and Android SDK for Sentry. This repository contains the source code and examples for SDK usage. | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| - **Language**: Java and Kotlin | ||
| - **Build Framework**: Gradle | ||
|
|
||
| ## Key Commands | ||
|
|
||
| ```bash | ||
| # Format code and regenerate .api files | ||
| ./gradlew spotlessApply apiDump | ||
|
|
||
| # Run all tests and linter | ||
| ./gradlew check | ||
|
|
||
| # Run unit tests for a specific file | ||
| ./gradle ':<module>:testDebugUnitTest' --tests="*<file name>*" --info | ||
| ``` | ||
|
|
||
| ## Contributing Guidelines | ||
|
|
||
| 1. Follow existing code style and language | ||
| 2. Do not modify the API files (e.g. sentry.api) manually, instead run `./gradlew apiDump` to regenerate them | ||
| 3. Write comprehensive tests | ||
| 4. Use Kotlin only for test code and Android modules which already use Kotlin, otherwise use Java | ||
| 5. New features should be opt-in by default, extend `SentryOptions` with getters and setters to enable/disable a new feature | ||
| 6. Consider backwards compatibility | ||
| 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` | ||
|
|
||
| ## Coding rules | ||
|
|
||
| 1. First think through the problem, read the codebase for relevant files, and propose a plan | ||
| 2. Before you begin working, check in with me and I will verify the plan | ||
| 3. Then, begin working on the todo items, marking them as complete as you go | ||
| 4. Please every step of the way just give me a high level explanation of what changes you made | ||
| 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. | ||
| 6. Once you're done, format the code and regenerate the .api files using the following command `./gradlew spotlessApply apiDump` | ||
| 7. As a last step, do a git commit | ||
|
|
||
|
|
||
| ## Useful Resources | ||
|
|
||
| - Main SDK documentation: https://develop.sentry.dev/sdk/overview/ | ||
| - Internal contributing guide: https://docs.sentry.io/internal/contributing/ | ||
| - Git commit messages conventions: https://develop.sentry.dev/engineering-practices/commit-messages/ | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.