Code Review
How It Works
Whenever a team member opens a pull request, Kody performs a Code Review directly in your code management tool, such as GitHub or GitLab. Kody analyzes the code, provides detailed feedback, and highlights potential issues, just as a human reviewer would. This ensures code quality and speeds up the review process.
Additionally, you can use the command @kody start-review
directly in Git to have Kody initiate a code review on any pull request. This command bypasses branch and naming configurations, so Kody will review any PR where the command is used.
Code Review Settings
Customize Kody’s Code Review to align with your team’s specific needs.
Code Style Guide
Set up your style guide to ensure consistent standards across the codebase.
Style Guide per Path
Path-specific instructions allow you to set additional, file-specific code review conditions based on file paths. These guide Kody’s code review automation to apply specific guidelines only where they’re most relevant.
Examples:
-
Special Rules for Certain Files or Directories:
- Projects often contain files or folders that require particular attention due to sensitivity or complexity, such as configuration files, deployment scripts, or security-related code.
- Example: For files in
config/
, ensure they follow strict security checks to prevent hardcoded sensitive information.
-
Code Review Customization:
- Tailor review practices for different code areas, ensuring specific guidelines are followed in relevant sections.
- Example: In the
api/
directory, emphasize input validation and error handling.
-
Enhancing Code Quality:
- Example: In UI-related files, focus on accessibility and responsiveness best practices.
Automatic Review
Choose whether you want reviews to trigger automatically or only when you issue the command @kody start-review
in a pull request.
Types of Analysis
Select the types of analysis you’d like Kody to perform. Options include:
-
Performance Optimization: Identifies improvements for code efficiency, performance, and resource usage.
-
Security: Detects vulnerabilities and improves code security.
-
Error Handling: Enhances how errors and exceptions are managed.
-
Refactoring: Restructures code to improve readability, maintainability, or modularity.
-
Maintainability: Enhances code to simplify future maintenance and extension.