Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions common-docs/code-review-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Code Review Guide
🧠 Purpose

The goal of code reviews is to ensure high-quality, readable, and maintainable code while helping trainees learn best practices. A good review focuses on collaboration and learning — not criticism.

💬 How to Review Code

Read the description first
Understand what the code is trying to achieve (feature, bug fix, improvement).

Run the code (if possible)
Test the feature locally to confirm it works as described.

Check for clarity and readability

Are variable and function names meaningful?

Is the code easy to follow?

Are there comments where needed?

Look for best practices

Consistent indentation and formatting.

Avoid repetition — could something be reused?

Follows project naming and file structure conventions.

Check for potential issues

Any security or performance risks?

Unnecessary console logs or unused code?

Proper error handling?

Give constructive feedback

Be kind and specific.

Suggest solutions, not just point out problems.

Use a positive tone like:

“This works well! Maybe extract this logic into a helper function to improve reusability.”

🧩 Example Review Comment

✅ Great job on implementing the feature!
💡 You could use Array.map() here instead of a loop to make the code cleaner.
🧹 Remember to remove debug logs before merging.

📎 Related Guides

- [CodeYourFuture Reviewing Guide](https://programming.codeyourfuture.io/guides/reviewing/)
- [Review Checklist](https://programming.codeyourfuture.io/guides/reviewing/checklist/)

📚 Additional Resources

CodeYourFuture Review Guidelines