Skip to content

Commit 7b63ae6

Browse files
committed
Add guidance for code style and refactoring
1 parent d67c245 commit 7b63ae6

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎CLAUDE.md‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,20 @@ You will be asked to make all the tests in a file pass.
1818
+ You have made the current file pass when the error mentions the next numbered test file.
1919
+ You should run the whole test suite each time so that you catch and fix any regressions.
2020
+ Run the tests with the `./run-tests` command and then write code to make the failing tests pass.
21-
+ Create a commit each time you implement a logical set of functionality. Prefer smaller, atomic commits and you can create multiple commits per test file.
21+
+ Create a commit each time you implement a logical set of functionality. Prefer smaller, atomic commits and you can create multiple commits per test file.
22+
23+
## Code style
24+
25+
+ Use common patterns and features of Ruby (Ruby version 3.3).
26+
+ Write understandable and maintainable code
27+
+ Try to use organize code into smaller methods
28+
+ Prefer self documenting code with descriptive methods and variables rather than using comments.
29+
30+
## Refactoring
31+
32+
You may be asked to refactor the code in order to make it easier to understand and extend.
33+
34+
+ Think about what refactors to implement and the pros and cons of each.
35+
+ Avoid premature optimization and architecting of code until there is a need to.
36+
+ It's fine not to perform any refactors, or to save refactoring ideas for later.
37+
+ You MUST create a DIFFERENT commit each refactor. Do NOT put multiple refactors in a single commit

0 commit comments

Comments
 (0)