Skip to content

Commit e2833e1

Browse files
authored
Add basic Cursor rules (#19864)
* Add basic cursor rules. * Only apply Python rules when editing Python source code or project files.
1 parent e1f7467 commit e2833e1

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

.cursor/rules/edit-changelog.mdc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
7+
# Adding a changelog entry
8+
9+
## New Features
10+
`ddev release changelog new added <INTEGRATION> -m "<MESSAGE>"`
11+
For example:
12+
`ddev release changelog new added kafka_consumer -m "Bump OpenSSL in confluent-kafka to 3.4.1 on Windows."`
13+
14+
## Fixes
15+
`ddev release changelog new fixed <INTEGRATION> -m "<MESSAGE>"`
16+
For example:
17+
`ddev release changelog new fixed sqlserver -m "Fix a bug where ``tempdb`` is wrongly excluded from database files metrics due to all instances inherited from ``SqlserverDatabaseMetricsBase`` share the same reference of auto-discovered databases."`

.cursor/rules/format-code.mdc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
description:
3+
globs: **/*.py
4+
alwaysApply: false
5+
---
6+
Format code with `ddev test -fs <INTEGRATION>`. For example, for the pgbouncer integration, run `ddev test -fs pgbouncer`.

.cursor/rules/general.mdc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
description:
3+
globs: **/*.py,**/*.toml
4+
alwaysApply: false
5+
---
6+
* Always run unit/integration tests after modifying code files. Run E2E tests only if requested.
7+
* Always auto-format code with ddev test -fs.

.cursor/rules/testing.mdc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
description:
3+
globs: **/*.py
4+
alwaysApply: false
5+
---
6+
Run unit and integration tests with `ddev --no-interactive test <INTEGRATION>`. For example, for the pbouncer integration, run `ddev --no-interactive test pgbouncer`.
7+
Run E2E tests with `ddev ddev --no-interactive env test <INTEGRATION> --dev`. For example, for the pbouncer integration, run `ddev ddev --no-interactive env test pgbouncer --dev`.

0 commit comments

Comments
 (0)