Code Reviews
This document describes our best practices for leaving effective code reviews.
This content is recommended.
Rationale
Code reviews are a crucial part of the development workflow. They ensure code quality, promote knowledge sharing, and improve team collaboration. Adhering to these best practices will make code reviews more effective and efficient.
Checklist
Clarity
✔️ The code makes sense
✔️ The code is succinct and clear
Simplicity
✔️ The code uses the simplest approach possible
✔️ Complicated algorithms are avoided
✔️ Simpler packages or libraries are used
Testing
✔️ The code has sufficient test coverage
✔️ All edge cases are covered
Bugs
✔️ Bugs or issues are identified ahead of time
Logging/Monitoring/Errors
✔️ There is sufficient logging to debug issues
✔️ Errors are handled appropriately
Other things to Consider
Formatting
✔️ Formatting issues are handled by prettier/eslint and addressed by automated checks
✔️ Formatting issues indicate that prettier/eslint needs a config update
Spelling Mistakes
✔️ Spelling mistakes are handled by plugins, but not everyone has them installed
✔️ Fixing spelling mistakes avoids confusion down the line
Documentation / Comments
✔️ Documentation and comments are present where appropriate and useful
Respectfulness
✔️ Be respectful
✔️ Ask questions or provide suggestions, avoid demands
✔️ Don't use aggressive or insulting language
✔️ If feedback threads go on for too long, take things offline by setting up a meeting or talking on Slack/Teams
Reasoning
✔️ Provide reasoning
✔️ Link to sources on why a change might be appropriate
Timelines
✔️ Consider timelines
✔️ Don't add requirements that aren't part of the acceptance criteria