Code review best practices
This page lists best practices for performing code reviews with CodeRabbit.
For more information about working withCodeRabbit through chat, seeControl and manage code reviews.
For a CodeRabbit command reference, seeCode review command reference.
Recommended code-review workflow
- Start with
@coderabbitai reviewfor checking new changes. - Use
@coderabbitai full reviewwhen major changes require a fresh perspective. - Generate summaries after significant updates using
@coderabbitai summary.
Managing large changes
- Use
@coderabbitai pausebefore making multiple commits. - Resume reviews with
@coderabbitai resumewhen ready. - Consider
@coderabbitai full reviewafter substantial changes.
Documentation flow
- Run
@coderabbitai generate docstringsafter finalizing function implementations. - Learn more aboutdocstring generation.
Overall tips
- Commands are case-insensitive (
@coderabbitai REVIEWworks the same as@coderabbitai review). - Commands can be issued by anyone with write access to the repository.
- Multiple commands can be used in sequence as needed.
- Use
@coderabbitai configurationto export your settings before making changes.
Command response time
- Most commands (pause, resume, ignore) take effect immediately.
- Review commands typically complete within a few minutes, depending on PR size.
- Docstring generation time varies based on the number of functions.