Cursor rule
.cursor/rules/clean_code.mdc[object Object]
Cursor rules
Quality
38/100
Scores the file, not the repository.Length
118 words
3 headings · 1 code blocksRepository
0
— · pushed 480 days agoLast changed
3 days ago
First indexed 3 days ago.123456always print # Clean Code in the Project78## General Principles9- Code should be **readable, maintainable, and purposeful**.10- Avoid unnecessary comments. The code should explain itself.11- Names of variables, methods, and classes should be **clear and semantic**.12- Methods should be short and perform only **one specific task**.1314## Key Rules15- **No more than 20 lines per method**.16- **No more than 2-3 parameters per method**.17- Use `guard clauses` instead of nested `if-else`.18- Use value objects instead of multiple parameters.1920## Clean Code Example21**❌ Bad Code**22```ruby23def process_order(order, user, discount, tax)24 if order && user25 total = order.total_price - discount + tax26 user.update_balance(total)27 else28 raise 'Error'29 end30end31```32```3334```
Also in nduartex/cursor-rules-ruby-api
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| nduartex/cursor-rules-ruby-api.cursor/rules/api.mdc · 0 | Cursor rules | api | 19/100 | 3 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/database.mdc · 0 | Cursor rules | no sections | 4/100 | 3 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/design_patterns.mdc · 0 | Cursor rules | style | 49/100 | 3 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/general.mdc · 0 | Cursor rules | do-not | 11/100 | 3 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/git.mdc · 0 | Cursor rules | stylearchtypesgit+2 | 65/100 | 3 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/ruby.mdc · 0 | Cursor rules | styledo-not | 15/100 | 3 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/security.mdc · 0 | Cursor rules | securityapido-not | 32/100 | 3 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/serializers.mdc · 0 | Cursor rules | do-not | 52/100 | 3 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/swagger.mdc · 0 | Cursor rules | styledocs | 49/100 | 3 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/testing.mdc · 0 | Cursor rules | testdo-not | 15/100 | 3 days ago |
Diff against .cursor/rules/api.mdc Diff against .cursor/rules/database.mdc Diff against .cursor/rules/design_patterns.mdc Diff against .cursor/rules/general.mdc Diff against .cursor/rules/git.mdc Diff against .cursor/rules/ruby.mdc Diff against .cursor/rules/security.mdc Diff against .cursor/rules/serializers.mdc Diff against .cursor/rules/swagger.mdc Diff against .cursor/rules/testing.mdc
