Skip to content

Commit 17d7cbe

Browse files
authored
Improving the way to organize cursor rules (#2)
* Improving the way to organize cursor rules * Updating README
1 parent f6d13bb commit 17d7cbe

10 files changed

Lines changed: 46 additions & 7 deletions
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Extension to java rules from the book Effective Java
2+
description: Extension to java rules from the book "Effective Java"
33
globs: .java
44
alwaysApply: true
55
---
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
description: Extension to java rules from the book "Pragmatic Unit Testing: Summary"
3+
globs: .java
4+
alwaysApply: true
5+
---
6+
7+
# Pragmatic Unit Testing: Summary
8+
9+
## General Principles:
10+
- Test anything that might break Test everything that does break
11+
- New code is guilty until proven innocent Write at least as much test code as production code
12+
- Run local tests with each compile
13+
- Run all tests before check-in to repository
14+
15+
## Questions to Ask:
16+
- If the code ran correctly, how would I know?
17+
- How am I going to test this? What else can go wrong? Could this same kind of problem happen anywhere else?
18+
- What to Test: Use Your RIGHT-BICEP Are the results right?
19+
- Are all the boundary conditions CORRECT? Can you check inverse relationships?
20+
- Can you cross-check results using other means?
21+
- Can you force error conditions to happen? Are performance characteristics within
22+
bounds?
23+
24+
## Good tests are A TRIP
25+
- Automatic
26+
- Thorough
27+
- Repeatable
28+
- Independent Professional
29+
- Conformance
30+
31+
## CORRECT Boundary Conditions
32+
- Does the value conform to an expected format?
33+
- Ordering — Is the set of values ordered or unordered as appropriate?
34+
- Range — Is the value within reasonable minimum and maximum values?
35+
- Reference - Does the code reference anything external that isn't under direct control of the code itself?
36+
- Existence - Does the value exist? (e.g., is non-null, non-zero, present in a set, etc.)
37+
- Cardinality - Are there exactly enough values?
38+
- Time (absolute and relative) - Is everything happening in order? At the right time? In time?
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Quarkus

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ A collection of Cursor rules for Java space.
66

77
## Rules
88

9-
- [Java](.cursor/rules/01-java.mdc)
10-
- [Effective Java](.cursor/rules/02-effective-java.mdc)
11-
- [Concurrency](.cursor/rules/03-concurrency.mdc)
12-
- [Functional Programming](.cursor/rules/04-functional-programming.mdc)
13-
- [Data oriented programming](.cursor/rules/05-data-oriented-programming.mdc)
14-
- [Spring boot](.cursor/rules/06-spring-boot.mdc)
9+
- [Java](.cursor/rules/100-java-general.mdc)
10+
- [Concurrency](.cursor/rules/101-java-concurrency.mdc)
11+
- [Functional Programming](.cursor/rules/102-java-functional-programming.mdc)
12+
- [Data oriented programming](.cursor/rules/103-java-data-oriented-programming.mdc)
13+
- [Effective Java](.cursor/rules/201-book-effective-java.mdc)
14+
- [Pragmatic Unit Testing](.cursor/rules/202-book-pragmatic-unit-testing.mdc)
1515

1616
## References
1717

docs/cursor-settings.png

26 KB
Loading

0 commit comments

Comments
 (0)