Available Commands
Invoke the AI Code Review Agent manually or within a workflow.
Last updated
Invoke the AI Code Review Agent manually or within a workflow.
Last updated
Bito Inc. (c) 2024
The AI Code Review Agent offers a suite of commands tailored to developers' needs. You can manually trigger a code review by entering any of these commands in the comment box below a pull/merge request on GitHub, GitLab, or Bitbucket and submitting the comment. Alternatively, if you are using the self-hosted version, you can configure these commands in the bito-cra.properties file for automated code reviews.
It may take a few minutes to get the code review posted as a comment, depending on the size of the pull/merge request.
This command provides a broad overview of your code changes, offering suggestions for improvement across various aspects but without diving deep for secure coding or performance optimizations or scalability improvements etc. This makes it ideal for catching general code quality issues that might not necessarily be critical blockers but can enhance readability, maintainability, and overall code health.
Think of it as a first-pass review to identify potential areas for improvement before delving into more specialized analyses.
Five specialized commands are available to perform detailed analyses on specific aspects of your code. Details for each command are given below.
/review security
/review performance
/review scalability
/review codeorg
/review codeoptimize
You can provide comma-separated values to perform multiple types of code analysis simultaneously.
Example: /review performance,security,codeoptimize
This command performs an in-depth analysis of your code to identify vulnerabilities that could allow attackers to steal data, gain unauthorized access, or disrupt your application. This includes checking for weaknesses in input validation, output encoding, authentication, authorization, and session management. It also looks for proper encryption of sensitive data, secure coding practices, and potential misconfigurations that could expose your system.
This command evaluates the current performance of the code by pinpointing slow or resource-intensive areas and identifying potential bottlenecks. It helps developers understand where the code may be underperforming against expected benchmarks or standards. It is particularly useful for identifying slow processes that could benefit from further investigation and refinement.
This includes checking how well your code accesses data and manages tasks like database interactions and memory usage.
This command analyzes your code to identify potential roadblocks to handling increased usage or data. It checks how well the codebase supports horizontal scaling and whether it is compatible with load balancing strategies. It also ensures the code can handle concurrent requests efficiently and avoids bottlenecks from single points of failure. The command further examines error handling and retry mechanisms to promote system resilience under pressure.
This command scans your code for readability, maintainability, and overall clarity. This includes checking for consistent formatting, clear comments, well-defined functions, and efficient use of data structures. It also looks for opportunities to reduce code duplication, improve error handling, and ensure the code is written for future growth and maintainability.
This command helps identify specific parts of the code that can be made more efficient through optimization techniques. It suggests refactoring opportunities, algorithmic improvements, and areas where resource usage can be minimized. This command is essential for enhancing the overall efficiency of the code, making it faster and less resource-heavy.
By default, the /review
command generates inline comments, placing code suggestions directly beneath the corresponding lines in each file for clearer guidance on improvements. If you prefer a single consolidated code review instead of separate inline comments, use the #inline_comment
parameter and set its value to False
.
Example: /review #inline_comment=False
Example: /review scalability #inline_comment=False
Note: The /review
command defaults to #inline_comment=True
, so you can omit this parameter when its value is True
.