diff --git a/docs/changelog.md b/docs/changelog.md index 240fbdfa..e9d04422 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -5,6 +5,46 @@ description: The latest updates and changes to CodeRabbit. sidebar_position: 13 --- +## July 3, 2025 + +### Enhanced Python Static Analysis: Flake8 Support + +We're excited to announce enhanced Python static analysis capabilities with [Flake8](https://flake8.pycqa.org/) support! + +[Flake8](https://flake8.pycqa.org/) is a Python linting utility that wraps PyFlakes, pycodestyle, and Mccabe to check your Python code for style and logical errors. + +See our [tools documentation](https://docs.coderabbit.ai/tools/) for more details. + +## July 1, 2025 + +### Enhanced Code Guidelines Support + +We've expanded our code guidelines scanning capabilities to provide even better code review experiences. CodeRabbit now automatically scans and learns from additional configuration files to understand your organization's coding standards and preferences. + +**New supported patterns:** + +- `**/.cursorrules` - Cursor IDE rules and preferences +- `.github/copilot-instructions.md` - GitHub Copilot instructions +- `**/CLAUDE.md` - Claude-specific coding guidelines +- `**/.cursor/rules/*` - Cursor rules directory +- `**/.windsurfrules` - Windsurf IDE rules +- `**/.clinerules/*` - Cline IDE rules +- `**/.rules/*` - General rules directory + +These guidelines are automatically analyzed and applied during code reviews to ensure consistency with your team's coding standards. You can configure these patterns in the knowledge base section of your CodeRabbit settings. + +## June 27, 2025 + +### Enhanced PHP Static Analysis: PHPMD and PHPCS Support + +We're excited to announce enhanced PHP static analysis capabilities with two powerful new tools! + +- [PHPMD](https://phpmd.org/) (PHP Mess Detector) is a static analysis tool that detects potential problems in your PHP code such as possible bugs, suboptimal code, overcomplicated expressions, and unused parameters, variables, methods, and classes. + +- [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) (PHP CodeSniffer) is a development tool that ensures your PHP code conforms to coding standards like PSR-1, PSR-2, PSR-12, and custom standards. It can automatically fix many coding standard violations. + +See our [tools documentation](https://docs.coderabbit.ai/tools/) for more details. + ## June 11, 2025 ### Enhanced Static Analysis: HTMLHint and Checkmake Support diff --git a/docs/faq.md b/docs/faq.md index 8e5de723..6755fffa 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -205,12 +205,13 @@ In-trial and open-source plans have lower rate limits than the paid plan. In all The following limits enforced _per developer_: -| Feature | Free Plan | Trial Plan | OSS Plan | Pro/Lite Plan | -| ---------------- | ------------------------------------------ | ----------------------------- | ----------------------------- | ----------------------------- | -| Files per hour | 200/hour | 200/hour | 200/hour | 400/hour | -| Files per PR | 100 | 100 | 100 | 200 | -| Reviews per hour | 3 back-to-back, then 2/hour (Summary only) | 4 back-to-back, then 3/hour | 3 back-to-back, then 2/hour | 5 back-to-back, then 4/hour | -| Chat | N/A | 25 back-to-back, then 50/hour | 10 back-to-back, then 25/hour | 25 back-to-back, then 50/hour | +| Feature | Free Plan | Trial Plan | OSS Plan | Pro/Lite Plan | +| -------------------------------- | ------------------------------------------ | --------------------------------- | ----------------------------- | ----------------------------- | +| Files per hour | 200/hour | 200/hour | 200/hour | 400/hour | +| Files per PR | 100 | 100 | 100 | 200 | +| Reviews per hour | 3 back-to-back, then 2/hour (Summary only) | 4 back-to-back, then 3/hour | 3 back-to-back, then 2/hour | 5 back-to-back, then 4/hour | +| Reviews per hour (IDE Extension) | 1/hour | 5/hour (Pro trial), 1/hour(Other) | 1/hour | 5/hour (Pro), 1/hour(Lite) | +| Chat | N/A | 25 back-to-back, then 50/hour | 10 back-to-back, then 25/hour | 25 back-to-back, then 50/hour | ## Integration Guide {#integration-guide} diff --git a/docs/getting-started/configure-coderabbit.md b/docs/getting-started/configure-coderabbit.md index e8ee2e06..2e2a14f4 100644 --- a/docs/getting-started/configure-coderabbit.md +++ b/docs/getting-started/configure-coderabbit.md @@ -34,8 +34,7 @@ configuration in a YAML format. You can then copy the configuration to a ::: You can add a `.coderabbit.yaml` configuration file to the root of your -repositories. Below is a sample YAML file that can be used as a starting point -and changed as needed: +repositories. For a complete sample `.coderabbit.yaml` file which you can add to your repository and update as needed, see [Configuration file template](/reference/yaml-template). Write your configuration file in the below editor to validate: diff --git a/docs/guides/config-vscode.md b/docs/guides/config-vscode.md index 7a1fb8bd..02f60d8c 100644 --- a/docs/guides/config-vscode.md +++ b/docs/guides/config-vscode.md @@ -14,11 +14,11 @@ The instructions on this page are specific to using the extension with VSCode. I To navigate to the settings screen for the CodeRabbit VSCode extension, follow these steps: -1. In the activity bar, click the Extensions icon. +1. Open the CodeRabbit activity bar/sidebar. -1. In the sidebar, under **Installed**, click the gear-shaped **Manage** icon in the CodeRabbit row. +1. In the sidebar, click on gear shaped icon on top right(beside logout icon). -1. In the menu that appears, select **Settings**. +1. You can also search for CodeRabbit: Settings in the command palette to open the settings. The settings screen contains the following configuration controls. @@ -32,6 +32,14 @@ The **Agent Type** setting lets you choose the extension's response to using the - **Claude Code**: The extension opens the Terminal pane of your IDE and tries to use the `claude` command-line program to apply the suggested fix to your code. You need to have Claude Code installed for this option to be effective. +- **Codex CLI**: The extension opens the Terminal pane of your IDE and tries to use the `codex` command-line program to apply the suggested fix to your code. You need to have Codex CLI installed for this option to be effective. + +- **Cline**: The extension opens the `Cline` sidebar and runs a task to apply the suggested fix to your code. You need to have the `Cline` extension installed for this option to be effective. + +- **Roo**: The extension opens the `Roo` sidebar and runs a task to apply the suggested fix to your code. You need to have the `Roo` extension installed for this option to be effective. + +- **Kilo Code**: The extension opens the `Kilo Code` sidebar and runs a task to apply the suggested fix to your code. You need to have the `Kilo Code` extension installed for this option to be effective. + - **Clipboard**: The extension copies prompt text describing the suggested fix to your clipboard. From there, you can manually paste the prompt into the coding AI agent that you use with your IDE. For more information about the **Fix with AI** feature, see [Request help from your AI coding agent](/guides/use-vscode#agent). diff --git a/docs/guides/configuration-overview.md b/docs/guides/configuration-overview.md new file mode 100644 index 00000000..2a0dce54 --- /dev/null +++ b/docs/guides/configuration-overview.md @@ -0,0 +1,52 @@ +--- +title: Configure CodeRabbit +description: Learn the basics of configuring CodeRabbit for your organization. +sidebar_label: Overview +--- + +After you finish [integrating CodeRabbit with your Git platform](/platforms/), +you can configure CodeRabbit to best fit the needs of your Git platform's organization and repositories. + +## About CodeRabbit configuration + +CodeRabbit has [a lot of configuration options](/reference/configuration), with default settings that are designed to meet most needs. CodeRabbit is designed to work "out +of the box": if you don't change any of the +configuration settings away from the defaults, then CodeRabbit starts automatically +adding code reviews to new pull requests in your repositories. + +However, understanding how to configure CodeRabbit lets you tune its behavior +to the particulars of your team's code. A few advantages of manually configuring +CodeRabbit include the following: + +- Adjust the level of detail in CodeRabbit code reviews. +- Customize review instructions to meet your specific coding standards. +- Take advantage of agentic workflows that can speed up your review cycles. + +## Configuration methods {#methods} + +You can configure CodeRabbit in several ways, from global organization settings +down to configuration directives for specific repositories. + +### Organization settings {#org} + +If you want to apply the same CodeRabbit configuration to all of your organization's repositories, then +you can manage organizational settings using the CodeRabbit web UI. + +For more information, see [Set your organization preferences](/guides/organization-settings). + +### Repository settings {#repo} + +If you want to apply separate CodeRabbit configuration to your organization's different repositories, then you can +manage repository-specific CodeRabbit settings in two ways: + +- Add a `.coderabbit.yaml` file to the top level of your repository. +- Use the CodeRabbit web interface. + +For more information, see [Set your repository preferences](/guides/repository-settings). + +While the web interface provides and easier way to explore the available configuration options for your repository, we recommend using a `.coderabbit.yaml` file [as a best practice](/guides/setup-best-practices#yaml). + +## Initial configuration {#initial} + +The [Initial configuration guide](/guides/initial-configuration) tours you through several settings that we +recommend that you review after you set up CodeRabbit with your organization. diff --git a/docs/guides/custom-reports.md b/docs/guides/custom-reports.md index f4759124..a22b359e 100644 --- a/docs/guides/custom-reports.md +++ b/docs/guides/custom-reports.md @@ -295,6 +295,166 @@ Issues and tickets brings in conversations, descriptions, and comments from Jira - ``: markdown - The description of the issue. - ``: array of comment objects - Contains all the comments made on the issue. +#### Remove PRs without a "Score Card/Chart" bot comment + +This option gives you the ability to create a report limited only to pull requests containing a "Score Card" or "Score Chart" bot comment from CodeRabbit or other bots. To enable issues and tickets you must include the tag `` in your prompt. + +> **IMPORTANT:** This will automatically remove any pull requests from your reports if they do not contain a "Score Card" or "Score Chart" bot comment. Using this option without setting up a flow to create these comments will result in `No new pull request activity in the last XYZ hours` errors. Do not enable this option unless you have created a "Score Card" or "Score Chart" bot comment flow. + +For example you can ask coderabbit to check serveral conditions on a pull request and produce a "Score Chart": + +
+Click to view example User Score Card/Chart Comment: + +![Score Card/Chart Trigger Comment Example](/img/guides/score-card-trigger-comment.png) + +```markdown +@coderabbitai +Use the to guide the content of the summary. Use the format shown in <\_example> but do not include or refer to the example's content in the final summary/report. + + + +**Instructions:** +Generate a weekly code review report for the author of this pull request only following scoring parameters. Calculate the scores and compile the results into a table so that the team-wise average score can be easily determined. +**Scoring Parameters:** + +1. **Basic Code Standards (Score out of 2)** + + - Avoidance of hard-coded values + - No repetition of code (DRY principle) + +2. **Code Readability (Score out of 2)** + + - Presence of meaningful comments + - Proper variable declaration using `const` and `let` + +3. **Error Handling (Score out of 4)** + + - Handling failure scenarios (e.g., try-catch, fallbacks) + - Proper loading state implementation (e.g., button click loading states) + - Handling edge cases (e.g., checking for undefined or missing values) + - Input validation (ensuring correct user inputs) + +4. **Circle CI Check Validation (Score: 0 or 1)** + - `0` → Not Passed + - `1` → Passed + +**Final Score Calculation:** +Combine the scores from the parameters above to derive the final code quality score (out of 5). +**Output Format:** +Provide the final report in a table format with the following columns (use shorthand notations), be sure to include this list at the top above the chart in the "Column Notation" section so users understand what the columns mean: + +- **User Name (User)** +- **Basic Code Standards (BCS) (out of 2)** +- **Code Readability (CR) (out of 2)** +- **Error Handling (EH) (out of 4)** +- **Shopify Theme Check (CI) (out of 1)** +- **Final Code Quality Score (FCQS) (out of 9)** + + + +<\_example> + +## Column Notation + +- **User Name (User)** +- **Basic Code Standards (BCS) (out of 2)** +- **Code Readability (CR) (out of 2)** +- **Error Handling (EH) (out of 4)** +- **Shopify Theme Check (CI) (out of 1)** +- **Final Code Quality Score (FCQS) (out of 9)** + +## Score Chart + +| User | BCS (2) | CR (3) | EH (2) | CI (1) | FCQS (9) | +| -------- | ------- | ------ | ------ | ------ | -------- | +| John Doe | 2 | 3 | 2 | 1 | 9 | + + +``` + +
+ +Then CodeRabbit will reply with a score for you pull request: + +
+Click to view resulting Score Card/Chart bot comment: + +![CodeRabbit Score Card/Chart Result Comment Example](/img/guides/score-card-result-comment.png) + +
+ +You can then utilize this in a report. We recommend your report looks specifically for these score cards and puts together a unified report: + +
+Click to view example Report Prompt when using Score Card/Chart: + +![Report Example](/img/guides/score-card-report-result.png) + +![Where to put this prompt](/img/guides/where-score-report-prompt-go.png) + +Prompt Example: + +```markdown +Use the to guide the content of the summary. Use the format shown in but do not include or refer to the example's content in the final summary/report. + + +**Instructions:** + +Locate the score chart comment in the . There will be a single comment with data on these fields: + +- **User Name (User)** +- **Basic Code Standards (BCS) (out of 2)** +- **Code Readability (CR) (out of 2)** +- **Error Handling (EH) (out of 4)** +- **Shopify Theme Check (CI) (out of 1)** +- **Final Code Quality Score (FCQS) (out of 9)** + +These details may also be in the form of a chart such as: + +## Score Chart + +| User | BCS (2) | CR (3) | EH (2) | CI (1) | FCQS (9) | +| -------- | ------- | ------ | ------ | ------ | -------- | +| John Doe | 2 | 3 | 2 | 1 | 9 | + +You will create a new chart averaging all the values from various pull requests for each author. Only include pull requests with a `Score Chart`. Do not invent or create score charts if none exist. + + + + + +## Column Notation + +- **User Name (User)** +- **Basic Code Standards (BCS) (out of 2)** +- **Code Readability (CR) (out of 2)** +- **Error Handling (EH) (out of 4)** +- **Shopify Theme Check (CI) (out of 1)** +- **Final Code Quality Score (FCQS) (out of 9)** + +## Score Chart + +| User | BCS (2) | CR (3) | EH (2) | CI (1) | FCQS (9) | PR URL | +| -------- | ------- | ------ | ------ | ------ | -------- | ------ | +| John Doe | 2 | 3 | 2 | 1 | 9 | URL | +| Alex Foo | 2 | 3 | 2 | 1 | 9 | URL | + + + + +``` + +
+ +**Best Practices for Score Cards/Charts:** + +- The reporting bot only has access to your comments and summary (like a project manager) if you want to make a report looking for these score card/chart comments make sure the reviewer does this ahead of time. +- Only include checks for very specific scenarios, such as a specific check failing or using tabs vs spaces. +- Do not use general rules without explaining specifically what they mean. If you add "Insure the pull request follows development best practices" you must define what "development best practices" actually mean or the AI will guess. +- Make one point for each specific check and make sure its a True/False condition. +- Instead of manually commenting on pull requests you can use the [Github Actions Bot](https://github.com/marketplace/actions/create-or-update-comment) to automatically comment on pull requests and trigger coderabbit score card/chart comments by including `@coderabbit` in the comment. + ## Best Practices 1. **Be Specific** diff --git a/docs/guides/initial-configuration.md b/docs/guides/initial-configuration.md new file mode 100644 index 00000000..e702b081 --- /dev/null +++ b/docs/guides/initial-configuration.md @@ -0,0 +1,200 @@ +--- +title: Initial configuration guide +description: A tour through some initial configuration setup. +--- + +This page provides a tour through a selection of key CodeRabbit configuration options. + +For a general overview of how configuration in CodeRabbit works, see [Configure CodeRabbit](/guides/configuration-overview). For an exhaustive reference of all configuration options, see [Configuration reference](/reference/configuration). + +## How to use this guide {#use} + +This guide walks you through several CodeRabbit configuration options that you +can set in order to tune CodeRabbit code review behavior for your repositories. + +The default behavior and settings of CodeRabbit +works for most repositories, in most situations. However, becoming familiar with +the key settings described by this page can help you tune the behavior of +CodeRabbit for the specific needs of your team. You can use this guide when initially setting up your organization and repositories with CodeRabbit, or you can return to it after using CodeRabbit +for a while, when you feel ready to customize its behavior. + +Each section in the guide links to specific entries in the configuration reference. Each entry in the linked reference specifies the location of its configuration setting, in either the CodeRabbit web UI or your `.coderabbit.yaml` file. + +## Data retention and knowledge base settings {#data-retention} + +These settings help you control how much data about your code that CodeRabbit retains. +CodeRabbit temporarily stores information about your repositories in order to tailored reviews more quickly and better tailored to your team's needs. You can opt of these features if your organization has stricter data-retention policies. + +For more information about CodeRabbit data-retention policies, see +[Data privacy and security](/#data-privacy-and-security). + +### Enable or disable data retention globally {#data-retention-setting} + +:::note +This setting is available only at the organization level, and not per-repository. +::: + +Your CodeRabbit organization has a data-retention setting which acts as a master-switch to all CodeRabbit features that require it to store its own data about your repositories. If you disable data retention, then none of your repositories can use knowledge base or caching features, even if you configure those repositories to enable them. + +We recommend leaving this on. However, if your use of CodeRabbit requires strict data retention policy, then you can turn this off. + +For more information, see +[Data retention](/reference/configuration#data-retention) in the configuration reference. + +### Configure cache use {#cache} + +By default, CodeRabbit keeps a temporary cache of data about your repository in order to make subsequent code reviews faster. If this conflicts with your organization's data-retention policies, then you can disable this feature. + +For more information, see +[Disable cache](/reference/configuration#disable-cache) in the configuration reference. + +### Configure knowledge base retention {#opt-out} + +By default, CodeRabbit keeps its own [_knowledge base_](/integrations/knowledge-base): a store of metadata about your repositories, your team's history of pull requests, linked issues, and learnings about how CodeRabbit should tailor its own review behavior to best serve your team. If this long-term knowledge base storage conflicts with your organization's data-retention policies, then you can disable this feature. + +For more information, see +[Opt out](/reference/configuration#opt-out) in the configuration reference. + +### Configure learnings {#learnings} + +CodeRabbit learns your team's review preferences by letting you [teach it your preferences in plain language during code reviews](/integrations/knowledge-base#learnings). CodeRabbit remembers these preferences, and applies them to subsequent code reviews in the same repository. + +This setting lets you set the scope of which stored learnings that CodeRabbit should apply to its code reviews. For more information, see [Learnings](/reference/configuration#learnings) in the configuration reference. + +## Tune the length of code reviews {#content} + +By default, CodeRabbit writes thorough code reviews with several sub-sections. If you'd rather have CodeRabbit generated shorter reviews then you can change some of the following settings: + +- [Collapse walkthrough](/reference/configuration#collapse-walkthrough): wraps the detailed summary of proposed changes in collapsed-but-expandable container. (Off by default.) +- [Changed files summary](/reference/configuration#changed-files-summary): lists of files affected by this pull request. +- [Sequence diagrams](/reference/configuration#sequence-diagrams): includes a visual diagram of object interactions. +- [Assess linked issues](/reference/configuration#assess-linked-issues): assesses how well the pull request addresses any linked issues. +- [Related issues](/reference/configuration#related-issues): lists issues found in your issue tracker that might be related to this pull request. +- [Related pull requests](/reference/configuration#realted-prs): lists pull requests that might be related to this pull request. +- [Suggested labels](/reference/configuration#suggested-labels): Suggests labels for this pull request. +- [Suggested reviewers](/reference/configuration#suggested-reveiwers): automatically suggest reviewers for PR +- [Poem](/reference/configuration#poem): generates a short poem about this pull request. + +## Adjust path-specific CodeRabbit behavior {#path} + +You can give CodeRabbit additional instructions for reviewing specific files or +locations in your repository, or configure CodeRabbit to disregard certain file paths +during code reviews. + +For an overview about using path-based instructions in CodeRabbit, see [Path-based instructions](/guides/review-instructions#path-based). + +### Add path filters {#filters} + +If your repository contains files or locations that CodeRabbit should disregard when preparing code reviews—or you want CodeRabbit to limit its consideration to only certain files—then you can define one or more _path filters_. Adding path filters to a large repository containing a lot of data, generated files, or other non-code content can let CodeRabbit work faster. + +For example, the following `.coderabbit.yaml` excerpt instructs CodeRabbit to take review context only the contents of directories named `src/` in your repository, while disregarding any individual files with `.bin` or `.csv` extensions. + +```yaml +path_filters: + - "!**/*.bin" + - "!**/*.csv" + - "**/src/**" +``` + +For more information, see [Path filters](/reference/configuration#path-filters) in the CodeRabbit configuration reference. + +### Add general path instructions {#review-path} + +You can set _path instructions_ that provide CodeRabbit with additional review instructions for various files or locations in your repository. Each path instruction specifies a path specification and a set of instructions, the latter of which you express using natural language. + +For example, to give CodeRabbit review instructions specific to JavaScript and TypeScript files, you can add a section like this to your repository's `.coderabbit.yaml` file: + +```yaml +path_instructions: + - path: `src/**/*.{ts,tsx,js}` + instructions: "Review the React.js, TypeScript, JavaScript code for best practices. Check for common security vulnerabilities, such as SQL injection, insecure dependencies, and sensitive data exposure." +``` + +For more information, see [Path instructions](/reference/configuration#path-instructions) in the configuration reference. + +### Add documentation or unit-test path instructions {#doc-path} + +Similar to the general path instructions described by the previous section, you +can define path-based instructions that direct CodeRabbit to generate inline +documentation or unit tests, with specific instructions associated with different +locations or filenames. + +For more information, see [Docstrings](/reference/configuration#docstrings) and [Unit tests](/reference/configuration#unit-tests) in the configuration reference. + +## Set Automatic review behavior {#auto} + +By default, CodeRabbit automatically generates incremental code reviews for every new or updated pull request made against a repository's default branch. These settings listed in this section let you tune the behavior. + +### Configure incremental reviews {#incremental} + +By default, CodeRabbit generates a new automated review comment every time the branch of an existing pull request gets an additional commit pushed to it. + +If you want to limit CodeRabbit to posting only an initial automated review for a new pull request, with no automated response to further updates, then you can turn off this incremental-review behavior. If you do turn it off, then you can still [manually request reviews](/guides/commands#request). + +For more information, see [Automatic incremental review](/reference/configuration#automatic-incremental-review) in the configuration reference. + +### Restrict automatic reviews to certain labels {#labels} + +If you want to be choosier about which pull requests CodeRabbit should automatically review, then you can restrict it to review only pull requests that you mark with certain labels. + +For more information, see [Labels](/reference/configuration#labels) in the configuration reference. + +### Automatically review more branches {#branches} + +If you want CodeRabbit to extend its automatic-review attention beyond the default branch of your repository—that is, `main` or `master`, usually—then you can give CodeRabbit a list of other branches that it is allowed to review. + +For more information, see [Base branches](/reference/configuration#base-branches) in the configuration reference. + +## Configure tools {#tools} + +CodeRabbit has access to dozens of industry-standard open-source tools to help it perform its code reviews. These tools include a variety of linters, security analyzers, and other utilities. For a full list, see [List of supported tools](/tools/list). CodeRabbit chooses which tools to apply to a given code review on a case-by-case basis. + +By default, CodeRabbit considers every tool available to it during code reviews. If you want CodeRabbit to disregard certain tools, then you can disable them. + +Several tools that CodeRabbit uses also allow you to specify a path to a tool-specific configuration file in your repository. For example, the following `.coderabbit.yaml` excerpt directs CodeRabbit to use configuration files in the repository's `/pmd-config` directory when using the `pmd` tool: + +```yaml +reviews: + tools: + pmd: + enabled: true + config_file: /pmd-config/*.yml +``` + +For more information, see [Tools](/reference/configuration#tools) in the configuration reference. + +## Other code review settings {#other} + +### Adjust code-review strictness {#profile} + +If you want CodeRabbit to apply a much stricter and more nitpicky stance to its code reviews, then you can switch its _profile_ setting from `chill` to `assertive`. + +CodeRabbit is aware of nitpickier output from the linters and other tools that it applies to code reviews, but includes less of it in its own review comments when the profile is set to `chill`. To have CodeRabbit include more nitpicky tool output in reviews, use the `assertive` profile. + +For more information, see [Profile](/reference/configuration#profile) in the configuration reference. + +### Configure pull request approval {#request-changes} + +By default, CodeRabbit doesn't mark pull requests as approved after any code review, even if CodeRabbit doesn't have any further significant changes to suggest. This leaves the job of formal pull request approval entirely up to human reviewers. + +If you want to allow CodeRabbit to mark pull requests as approved, then you can enable the _request changes workflow_ setting. If you do, then CodeRabbit can approve pull requests after it reviewed a pull request and had all of its comments resolved. + +This can be useful if you have a workflow that requires several reviewers to approve a pull request before anyone can merge it. For example, if you have configured your repository on your Git platform to require two approvals for any pull request, then activating this CodeRabbit setting lets you merge a pull request after approval from CodeRabbit plus one human reviewer. This can help reduce your team's code-review load. + +:::note +We recommend a policy of always requiring the approval of at least one human reviewer, even if you allow CodeRabbit to approve pull requests. As with an generative AI technology, CodeRabbit works best as a helpful partner to your team, and not as a replacement for human expertise or judgment. +::: + +For more information, see [Request Changes Workflow](/reference/configuration#request-changes-workflow) in the configuration reference. + +### Configure chat-based issue creation {#chat-issues} + +You can [ask CodeRabbit to create issues for you](https://docs.coderabbit.ai/guides/issue-creation) in the comments of a pull request that it's reviewing. + +If you have integrated CodeRabbit with Jira or Linear, then you can tune this behavior a little more, restricting this feature to private repositories—the default setting—or disabling it entirely. + +For more information, see [Integrations](/reference/configuration#integrations) in the configuration reference. + +## What's next {#whats-next} + +- [Setup and configuration best practices](/guides/setup-best-practices) diff --git a/docs/guides/organization-settings.md b/docs/guides/organization-settings.md new file mode 100644 index 00000000..5b00d77d --- /dev/null +++ b/docs/guides/organization-settings.md @@ -0,0 +1,30 @@ +--- +title: Set your organization preferences +description: Learn the basics of configuring CodeRabbit for your organization. +--- + +This page is about managing the default settings of CodeRabbit across your +whole Git platform organization. + +For a general overview of configuring CodeRabbit, see [Configure CodeRabbit](/guides/configuration-overview). + +## About organization settings {#about} + +You can use the CodeRabbit web interface to set the CodeRabbit configuration +for all of the Git repositories associated with your organization. By default, all of your repositories apply your organization's CodeRabbit configuration. + +You have the option to define separate settings for some or +all of your individual repositories, instead. For more information, see [Set your repository preferences](/guides/repository-settings). + +## Browse and modify your organization settings {#modify} + +To view or modify your organizational settings, follow these steps: + +1. Visit [the CodeRabbit web interface](https://app.coderabbit.ai/settings/repositories). +1. In the sidebar, click **Organization Settings** > **Configuration**. +1. Browse and modify the settings as needed. If you do make changes, click **Apply Changes** when you are finished. + +## What's next {#whats-next} + +- [Initial configuration guide](/guides/initial-configuration) +- [Configuration best practices](/guides/setup-best-practices#configuration) diff --git a/docs/guides/repository-settings.md b/docs/guides/repository-settings.md new file mode 100644 index 00000000..34ca9d56 --- /dev/null +++ b/docs/guides/repository-settings.md @@ -0,0 +1,43 @@ +--- +title: Set your repository preferences +description: Learn the basics of configuring CodeRabbit for your repository. +--- + +This page is about managing the settings of CodeRabbit for your +Git repository. For a general overview of configuring CodeRabbit, see [Configure CodeRabbit](/guides/configuration-overview). + +## About repository settings {#about} + +CodeRabbit provides two ways to manage its code-review behavior with each of your organization's repositories: + +- Add a `.coderabbit.yaml` file to your repository. +- View or modify your per-repository settings using the CodeRabbit web interface. + +If your repository contains a `.coderabbit.yaml` file at the top level of its default branch, +then CodeRabbit applies all of its settings to that repository's code reviews. CodeRabbit applies its own default values to any configuration settings not defined by your `.coderabbit.yaml` file. + +If your repository doesn't have a `.coderabbit.yaml` file, then CodeRabbit applies the configuration from the CodeRabbit web interface, instead. + +While the web interface provides an easier way to explore the available configuration options for your repository, we recommend using a `.coderabbit.yaml` file [as a best practice](/guides/setup-best-practices#yaml). + +## Configure your repository with `.coderabbit.yaml` + +To add a `.coderabbit.yaml` file to your repository, merge a copy of [our template configuration file](/reference/yaml-template) +to the top level of your default branch. From there, you can update your repository's CodeRabbit configuration by updating the `.coderabbit.yaml` file exactly as you would any other text file in your repository. + +For more information about the `.coderabbit.yaml` file, see [Add a configuration file](/getting-started/configure-coderabbit). + +## Browse and modify your settings using the web interface {#modify} + +To view or modify your repository settings using the CodeRabbit web interface, follow these steps: + +1. Visit [the CodeRabbit web interface](https://app.coderabbit.ai/settings/repositories). +1. In the sidebar, click **Repositories**. +1. Click the gear-shaped **Settings** icon of the repository whose settings you want to view or modify. +1. If the **Use Organization Settings** toggle is on, then click it to turn it off. If you leave it on, then CodeRabbit applies the settings you have set through [the organization-configuration page](/guides/organization-settings) to this repository. +1. Browse and modify the settings as needed. If you do make changes, click **Apply Changes** when you are finished. + +## What's next {#whats-next} + +- [Initial configuration guide](/guides/initial-configuration) +- [Configuration best practices](/guides/setup-best-practices#configuration) diff --git a/docs/guides/setup-best-practices.md b/docs/guides/setup-best-practices.md index 56e39dee..c6caa094 100644 --- a/docs/guides/setup-best-practices.md +++ b/docs/guides/setup-best-practices.md @@ -66,18 +66,18 @@ CodeRabbit gives you two ways to configure how it works with your team's reposit - The **Organization Settings** and **Repositories** pages of [the CodeRabbit web interface](https://app.coderabbit.ai/login) -- A [`coderabbit.yaml` file](/getting-started/configure-coderabbit/) in your repository +- A [`.coderabbit.yaml` file](/getting-started/configure-coderabbit/) in your repository The web interface lets you set up your organization's code review preferences rapidly, and can help you get familiar with CodeRabbit configuration options. -We recommend adding a `coderabbit.yaml` file to repositories, as well. Using this file has several advantages over using only the web interface: +We recommend adding a `.coderabbit.yaml` file to repositories, as well. Using this file has several advantages over using only the web interface: - It applies version control to your repository's CodeRabbit settings, letting you track changes, view configuration history, and revert to previous configurations as needed. - During code reviews, CodeRabbit loads the file along with rest of your repository. This means that you can include setting changes as part of a pull request, and CodeRabbit both analyzes and applies these settings during its review. - The file makes the repository's CodeRabbit settings transparent to all of the repository's contributors. -Repository-level settings defined by a `coderabbit.yaml` take precedence over the +Repository-level settings defined by a `.coderabbit.yaml` take precedence over the settings defined for that repository or for your organization using the CodeRabbit web interface. For more information, see [Add a configuration file](/getting-started/configure-coderabbit/). @@ -94,7 +94,7 @@ Reducing the number of contextual files that CodeRabbit needs to read and analyz when preparing a code review can help make its code reviews faster. You can define path filters using the CodeRabbit -web interface, or with [a `coderabbit.yaml` file](/getting-started/configure-coderabbit/). +web interface, or with [a `.coderabbit.yaml` file](/getting-started/configure-coderabbit/). ### Trust the defaults {#defaults} @@ -106,7 +106,7 @@ CodeRabbit gives you control over a number of its core code-review features, let tools](/tools) that are available to it during code reviews. This helps CodeRabbit keep its reviews broad and flexible. - **Knowledge base**: CodeRabbit [knowledge base](/integrations/knowledge-base/) features, including learnings and issue tracking, can require data retention. If your organization needs to meet stricter data-retention policies, then you can opt out of using these features. -You can configure your use of the above features using the CodeRabbit web interface, or [a `coderabbit.yaml` file](/getting-started/configure-coderabbit/). +You can configure your use of the above features using the CodeRabbit web interface, or [a `.coderabbit.yaml` file](/getting-started/configure-coderabbit/). ### Write specific CI/CD error messages {#pipeline} diff --git a/docs/guides/use-vscode.md b/docs/guides/use-vscode.md index bfacd87b..169dc2a8 100644 --- a/docs/guides/use-vscode.md +++ b/docs/guides/use-vscode.md @@ -18,7 +18,7 @@ You can let CodeRabbit automatically review commits that you make to your local To perform an automatic review, follow these steps: -1. Perform a Git commit using VSCode. After you do this, a dialog appears in your VSCode window, asking **Would you like to start a review?** +1. Perform a Git commit using VSCode or terminal. After you do this, a dialog appears in your VSCode window, asking **Would you like to start a review?** 1. Click **Yes**. The CodeRabbit sidebar appears in your VSCode window. diff --git a/docs/platforms/bitbucket-cloud.md b/docs/platforms/bitbucket-cloud.md index 286321d5..385d46ed 100644 --- a/docs/platforms/bitbucket-cloud.md +++ b/docs/platforms/bitbucket-cloud.md @@ -13,90 +13,90 @@ CodeRabbit integrates with Bitbucket Cloud to enhance code review and collaborat This guide will assist you in effectively integrating CodeRabbit with Bitbucket Cloud. -## Configure App Password +## Configure API Token -To enable CodeRabbit to interact with your Bitbucket repositories, an app password is required. This token grants the necessary permissions for interacting with the Merge Requests and Discussions APIs. +To enable CodeRabbit to interact with your Bitbucket repositories, an API token is required. This token grants the +necessary permissions for interacting with the Bitbucket merge request and discussion APIs. 1. Create a new Bitbucket account specifically for CodeRabbit and treat it as a service account. 2. Name the account "CodeRabbit". -3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this new account. -4. Generate an App Password to enable seamless integration between CodeRabbit and your Bitbucket repositories. +3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this + new account. +4. Generate an API Token to enable seamless integration between CodeRabbit and your Bitbucket repositories. -We recommend creating a new user as a service account, associating this user to the workspace you'd like to install CodeRabbit on, and providing CodeRabbit with the app password to allow access. During the installation process, CodeRabbit will automatically configure the required webhook for seamless integration. - -
- Bitbucket user modal -
+We recommend creating a new user as a service account, associating this user to the workspace you'd like to install +CodeRabbit on, and providing CodeRabbit with the API token to allow access. During the installation process, CodeRabbit +will automatically configure the required webhook for seamless integration. :::note -If you wish to change the review user, you must provide the app password for the new user who will post reviews and comments. However, this requires manually removing the previous user from the projects and associated webhooks. Once this is done, you will need to reinstall the CodeRabbit app for each project. +If you wish to change the review user, you must provide the API token for the new user who will post reviews and +comments. However, this requires manually removing the previous user from the projects and associated webhooks. Once +this is done, you will need to reinstall the CodeRabbit app for each project. ::: ### Recommendations -- **Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better access control. +- **Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better + access control. - **Use "CodeRabbit" as the username** - This makes the user easily recognizable for future reference. - **Use a dedicated email address** - This helps in easy identification and management. -- **Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo from [here](/img/integrations/logo.svg "download"). -- **Developer Access** Ensure the service account user has developer access to the projects that you wish to install CodeRabbit on. +- **Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo + from [here](/img/integrations/logo.svg "download"). +- **Developer Access** Ensure the service account user has developer access to the projects that you wish to install + CodeRabbit on. #### Key Points to Remember -- Code reviews will be attributed to the owner of the app password. +- Code reviews will be attributed to the owner of the API token. -#### Generating an App password +#### Generating an API token -Bitbucket provides an option to generate an app password for a new user. Follow these steps to generate the password: +Bitbucket provides an option to generate an API token for a new user. Follow these steps to generate the token: -1. Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews and related activities. -2. Go to "Personal Bitbucket Settings". -3. Choose **App passwords**. -4. Click **Create app password**. -5. Enter a label easily recognizable for this app passwords usage. +1. Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews + and related activities. +2. Go to [API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens). +3. Click **Create API token with scopes**. +4. Enter a name easily recognizable for this API token usage and an expiration date based on your plan of using the + product. +5. On next step select **Bitbucket** 6. Ensure the following scopes are selected: - 1. Account - Read - 2. Issues - Write - 3. Workspace membership - Read - 4. Projects - Write - 5. Repositories - Write - 6. Pull requests - Write - 7. Webhooks - Read and write - 8. Pipelines - Read - 9. Runners - Read + - read:account + - read:user:bitbucket + - write:issue:bitbucket + - read:issue:bitbucket + - read:workspace:bitbucket + - admin:project:bitbucket + - write:webhook:bitbucket + - read:webhook:bitbucket + - read:pipeline:bitbucket + - read:runner:bitbucket + - read:repository:bitbucket + - write:repository:bitbucket + - read:pullrequest:bitbucket + - write:pullrequest:bitbucket 7. Click **Create** -8. Note down the app password as it will only be displayed once. - -
- Bitbucket app password configuration page -
-
- Bitbucket app password permissions -
+8. Note down the API token as it will only be displayed once. -### Where to Provide CodeRabbit the App Password +### Where to Provide CodeRabbit the API Token -By default, if no app password is provided, CodeRabbit will prompt you to provide one during the installation process. However, if you wish to provide the token beforehand, you can do so by navigating to the **Organization Settings** tab, and selecting the **Bitbucket User** tab on the sidebar. Once entering the app password, the password will be validated and saved for future use. +By default, if no API token is provided, CodeRabbit will prompt you to provide one during the installation process. +However, if you wish to provide the token beforehand, you can do so by navigating to the **Organization Settings** tab, +and selecting the **Bitbucket User** tab on the sidebar. Once entering the API token, the token will be validated and +saved for future use. -You can confirm the correct user is being selected by verifying the user ID shown on the UI with the user ID of the service account user you created. +You can confirm the correct user is being selected by verifying the user ID shown on the UI with the user ID of the +service account user you created. --- ### Installing CodeRabbit into your Bitbucket Repositories 1. Go to the [Repositories page](https://app.coderabbit.ai/settings/repositories) in the CodeRabbit app. -2. Select the checkbox next to the repositories where you want to install CodeRabbit. To install it on all repositories at once, select the checkbox at the top. +2. Select the checkbox next to the repositories where you want to install CodeRabbit. To install it on all repositories + at once, select the checkbox at the top. 3. Select **Install Repositories**.
@@ -121,10 +121,12 @@ The webhook `https://coderabbit.ai/bitbucketHandler` will now be installed for t :::note -If you are experiencing issues with the webhook, such as CodeRabbit not being able to access the repository, or not reviewing pull requests, you can manually delete the webhook to the repository. +If you are experiencing issues with the webhook, such as CodeRabbit not being able to access the repository, or not +reviewing pull requests, you can manually delete the webhook to the repository. Then refresh the repository page in the CodeRabbit app and you can reinstall the webhook. -If you cannot install the webhook please check that your Bitbucket user has the necessary permissions to install the webhook and the App Password is properly configured. +If you cannot install the webhook please check that your Bitbucket user has the necessary permissions to install the +webhook and the API Token is properly configured. ::: diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md new file mode 100644 index 00000000..5109ba5a --- /dev/null +++ b/docs/reference/configuration.md @@ -0,0 +1,4234 @@ +--- +title: Configuration reference +description: Complete reference for all CodeRabbit configuration options. +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This reference guide lists all of the code review configuration options that +CodeRabbit makes available. + +For an overview of how configuration works with CodeRabbit, see [Configure CodeRabbit](/guides/configuration-overview). + +## How to use this reference {#how-to} + +Each entry in this reference corresponds to a single CodeRabbit configuration setting, including an informational table and a description of what the setting does. The tables have two views, which you can select with a tab: + +- The **Web UI** tab displays the location and default value of the setting in the CodeRabbit web interface, for both [organization settings](/guides/organization-settings) and [repository settings](/guides/repository-settings). +- The **coderabbit.yaml** tab displays information about the field's location and datatype in [your repository's `.coderabbit.yaml` file](/getting-started/configure-coderabbit). + +## Global Settings + +### Data retention + + + + + + + + + + + + + +
LocationGeneral > Data Retention
Defaulttrue
+
+ + _This setting can be defined only in the web UI settings for your + organization._ + +
+ +If `true`, then CodeRabbit is allowed to retain enough data about your code +review history in order to enable the following features: + +- **Caching**: allows CodeRabbit to store data about your repository between + code reviews, improving the speed of subsequent reviews. +- **Knowledge base**: allows CodeRabbit to maintain its own database about + your repository and your team's code review preferences, which can improve + the quality and specificity of code reviews generated by CodeRabbit. + +If your organization operates under strict data-retention policies, then you can +disable data retention. Doing so immediately deletes any cache or knowledge-base data that CodeRabbit has collected for your organization, and prevents CodeRabbit from +retaining further cache or knowledge-base data. + +If you re-enable data retention, then CodeRabbit re-enables these features, and resumes collecting cache and knowledge-base data. + +### Early Access + + + + + + + + + + + + + +
LocationGeneral > Early Access
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`early_access`
Datatypeboolean
Defaultfalse
+
+
+ +If enabled, then CodeRabbit lets you use early-access features in your +code reviews. + +### Enable Free Tier + + + + + + + + + + + + + +
LocationGeneral > Enable Free Tier
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`enable_free_tier`
Datatypeboolean
Defaulttrue
+
+
+ +If enabled, then CodeRabbit allows free tier features for users not on a paid plan. + +For more information about payment tiers and features, see [Pricing](https://www.coderabbit.ai/pricing). + +### Language + + + + + + + + + + + + + +
LocationGeneral > Language
Defaulten-US
+
+ + + + + + + + + + + + + + + +
Field`language`
Datatypestring
Default"en-US"
+
+
+ +Defines the written language that CodeRabbit presents its review comments in. Defaults +to U.S. English. + +### Tone Instructions + + + + + + + + + + + + + +
LocationGeneral > Tone Instructions
Default
+
+ + + + + + + + + + + + + + + +
Field`tone_instructions`
Datatypestring
Default
+
+
+ +A natural-language description of the tone of voice that CodeRabbit should +apply to its review instructions, if you want a tone different from its +default. + +A few possible examples: + +- `Use an encouraging, supportive tone that celebrates good practices while gently suggesting improvements.` +- `Adopt a concise, matter-of-fact style that gets straight to the point without unnecessary pleasantries.` +- `Deliver all review comments in the style of a televised nature documentary, perhaps with David Attenborough hosting.` + +## Review + +### Basic Review Settings + +#### Abort On Close + + + + + + + + + + + + + +
LocationReview > Settings > Abort On Close
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.abort_on_close`
Datatypeboolean
Defaulttrue
+
+
+ +Abort the in-progress review if the pull request is closed or merged. + +#### Assess Linked Issues + + + + + + + + + + + + + +
LocationReview > Settings > Assess Linked Issues
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.assess_linked_issues`
Datatypeboolean
Defaulttrue
+
+
+ +If enabled, then the reviews that CodeRabbit generates include assessments of how well a proposed code change addresses any issues that the pull request refers to. CodeRabbit considers issues referred to by number in the following locations: + +- The title of the pull request. +- The description of the pull request. +- (GitHub only) The **Development** field of the pull request. + +Besides this setting, issue assessment requires at least one of the following: + +- You use the built-in issue managemet system of GitHub or GitLab. +- You have integrated CodeRabbit with an external issue manager. + +For more information, see [Integrate issue tracking](/integrations/issue-integrations/) +and [Let CodeRabbit read your issue trakcer](https://docs.coderabbit.ai/guides/setup-best-practices#issues). + +#### Auto Apply Labels + + + + + + + + + + + + + +
LocationReview > Settings > Auto Apply Labels
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_apply_labels`
Datatypeboolean
Defaultfalse
+
+
+ +Automatically apply the suggested labels to the PR/MR. + +#### Auto Assign Reviewers + + + + + + + + + + + + + +
LocationReview > Settings > Auto Assign Reviewers
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_assign_reviewers`
Datatypeboolean
Defaultfalse
+
+
+ +Automatically assign suggested reviewers to the pull request + +#### Auto Title Instructions + + + + + + + + + + + + + +
LocationReview > Settings > Auto Title Instructions
Default
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_title_instructions`
Datatypestring
Default
+
+
+ +Custom instructions for auto-generating the PR/MR title. + +#### Auto Title Placeholder + + + + + + + + + + + + + +
LocationReview > Settings > Auto Title Placeholder
Default@coderabbitai
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_title_placeholder`
Datatypestring
Default"@coderabbitai"
+
+
+ +Add this keyword in the PR/MR title to auto-generate the title. + +#### Changed Files Summary + + + + + + + + + + + + + +
LocationReview > Settings > Changed Files Summary
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.changed_files_summary`
Datatypeboolean
Defaulttrue
+
+
+ +Generate a summary of the changed files in the walkthrough. + +#### Collapse Walkthrough + + + + + + + + + + + + + +
LocationReview > Settings > Collapse Walkthrough
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`reviews.collapse_walkthrough`
Datatypeboolean
Defaultfalse
+
+
+ +Generate walkthrough in a markdown collapsible section. + +#### Commit Status + + + + + + + + + + + + + +
LocationReview > Settings > Commit Status
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.commit_status`
Datatypeboolean
Defaulttrue
+
+
+ +Set the commit status to 'pending' when the review is in progress and 'success' when it is complete. + +#### Disable Cache + + + + + + + + + + + + + +
LocationReview > Settings > Disable Cache
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`reviews.disable_cache`
Datatypeboolean
Defaultfalse
+
+
+ +Activate this setting to disallow CodeRabbit from caching your repository's code and dependencies. This forces CodeRabbit to download the code and dependencies fresh from the repository for every code review that it performs. + +When caching is allowed, then CodeRabbit stores a cache of code and metadata from +your repostory for up to seven days after its most recent code review. This cache +lets CodeRabbit save time and effort in between subsquent reviews of the same +repository. For more information, see [Caching](/reference/caching/). + +We recommend leaving this setting off, which allows caching, and can speed up +code reviews. For more information, see +[Trust the defaults](https://docs.coderabbit.ai/guides/setup-best-practices#defaults). + +:::note +The [Data Retention](#data-retention) setting overrides this one. If you disable +all data retention, then your repositories won't keep a cache. +::: + +#### Fail Commit Status + + + + + + + + + + + + + +
LocationReview > Settings > Fail Commit Status
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`reviews.fail_commit_status`
Datatypeboolean
Defaultfalse
+
+
+ +Set the commit status to 'failure' when the PR cannot be reviewed by CodeRabbit for any reason. + +#### High Level Summary + + + + + + + + + + + + + +
LocationReview > Settings > High Level Summary
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.high_level_summary`
Datatypeboolean
Defaulttrue
+
+
+ +Generate a high level summary of the changes in the PR/MR description. + +#### High Level Summary In Walkthrough + + + + + + + + + + + + + +
LocationReview > Settings > High Level Summary In Walkthrough
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`reviews.high_level_summary_in_walkthrough`
Datatypeboolean
Defaultfalse
+
+
+ +Include the high level summary in the walkthrough comment. + +#### High Level Summary Placeholder + + + + + + + + + + + + + +
LocationReview > Settings > High Level Summary Placeholder
Default@coderabbitai summary
+
+ + + + + + + + + + + + + + + +
Field`reviews.high_level_summary_placeholder`
Datatypestring
Default"@coderabbitai summary"
+
+
+ +Placeholder in the PR/MR description that gets replaced with the high level summary. + +#### Labeling Instructions + + + + + + + + + + + + + +
LocationReview > Settings > Labeling Instructions
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.labeling_instructions`
Datatypearray
Default[]
+
+
+ +Provide guidelines for suggesting labels for the PR/MR. When specific labels or instructions are provided, only those labels are considered, though previous examples are still used to inform the suggestions. If no such labels are provided, suggestions are based solely on previous PR/MRs. + +#### Path Filters + + + + + + + + + + + + + +
LocationReview > Settings > Path Filters
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.path_filters`
Datatypearray
Default[]
+
+
+ +Path filters, if defined, restrict the portions of your repository that CodeRabbit +uses for context when preparing code reviews. + +You can define a list of path specifications, relative to the root of your +repository, to use as path filters. + +Paths can be _exclude paths_, which start with a leading `!` character, or _include +paths_. If the list of paths contains at least one include path, then CodeRabbit +includes _only_ files that match the provided paths. + +For example, the following list of path filters instructs CodeRabbit to limit its reviews +only to files found in the `src` top-level directory, but exclude any `.bin` or `.csv` +files: + +```bash +src/** +!**/*.{bin,csv} +``` + +:::note +Under the hood, CodeRabbit uses your provided list of path filters as an argument +to [`git sparse-checkout`](https://git-scm.com/docs/git-sparse-checkout) when preparing its own copy of your repository for code review +context. +::: + +We strongly recommend defining path filters for any repositories that contain +a significant amount of generated files or data that has no contextual bearing on code reviews. +CodeRabbit can work faster if it can ignore files that aren't relevant to pull requests. +For more information, see [Speed up reviews by adding path filters](https://docs.coderabbit.ai/guides/setup-best-practices#filters). + +#### Path Instructions + + + + + + + + + + + + + +
LocationReview > Settings > Path Instructions
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.path_instructions`
Datatypearray
Default[]
+
+
+ +Path instructions are additional sets of instructions, expressed in natural lanaguge, +that you provide to CodeRabbit for reveiwing certain files in your repository. + +You associate each set of instuctions with a file path relative to the root +of your repository. Your path specification can use extended glob patterns. + +The following example defines a set of path instructions for all TypeScript +and JavaScript files in a reposistory's `src` directory: + + + + ![An example path instruction](/img/reference/path-instructions.png) + + +```yaml +path_instructions: + - path: src/**/*.{ts,tsx,js} + instructions: + - Review the React.js/TypeScript/JavaScript code for best practices + - Check for common security vulnerabilities such as: + - SQL Injection + - Insecure dependencies + - Sensitive data exposure +``` + + + +For further examples of path instructions specific to various programming langauges, +see [the `awesome-coderabbit` public repository](https://github.com/coderabbitai/awesome-coderabbit/tree/main/configs). + +#### Poem + + + + + + + + + + + + + +
LocationReview > Settings > Poem
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.poem`
Datatypeboolean
Defaulttrue
+
+
+ +Generate a poem in the walkthrough comment. + +#### Profile {#profile} + + + + + + + + + + + + + +
LocationReview > Settings > Profile
Defaultchill
+
+ + + + + + + + + + + + + + + +
Field`reviews.profile`
Datatypestring
Default"chill"
+
+
+ +An overall selector for the level of detail that CodeRabbit should apply to +its reviews. Valid values are the following: + +- **`Chill`**: CodeRabbit provides its usual level of commentary. +- **`Assertive`**: CodeRabbit provides significantly deeper or more verbose commentary, + as much as possible. + +The `Chill` profile is the default setting, and is appropriate for most coding +contexts. The `Assertive` profile mode can get quite nitpicky in some circumstances. We recommend leaving this setting in `Chill`, unless a wordier level of code critique would benefit your team's work. + +#### Related Issues + + + + + + + + + + + + + +
LocationReview > Settings > Related Issues
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.related_issues`
Datatypeboolean
Defaulttrue
+
+
+ +Include possibly related issues in the walkthrough. + +#### Related PRs + + + + + + + + + + + + + +
LocationReview > Settings > Related PRs
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.related_prs`
Datatypeboolean
Defaulttrue
+
+
+ +Include possibly related pull requests in the walkthrough. + +#### Request Changes Workflow + + + + + + + + + + + + + +
LocationReview > Settings > Request Changes Workflow
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`reviews.request_changes_workflow`
Datatypeboolean
Defaultfalse
+
+
+ +If enabled, then CodeRabbit marks a pull request as approved once all comments +that CodeRabbit made have been resolved. + +Enable this setting if you want to have CodeRabbit's approval count towards +a minimum number of approvals that your have configured your Git platform +to require before a pull request can be merged. + +#### Review Status + + + + + + + + + + + + + +
LocationReview > Settings > Review Status
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.review_status`
Datatypeboolean
Defaulttrue
+
+
+ +Post review details on each review. Additionally, post a review status when a review is skipped in certain cases. + +#### Sequence Diagrams + + + + + + + + + + + + + +
LocationReview > Settings > Sequence Diagrams
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.sequence_diagrams`
Datatypeboolean
Defaulttrue
+
+
+ +Generate sequence diagrams in the walkthrough. + +#### Suggested Labels + + + + + + + + + + + + + +
LocationReview > Settings > Suggested Labels
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.suggested_labels`
Datatypeboolean
Defaulttrue
+
+
+ +Suggest labels based on the changes in the pull request in the walkthrough. + +#### Suggested Reviewers + + + + + + + + + + + + + +
LocationReview > Settings > Suggested Reviewers
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.suggested_reviewers`
Datatypeboolean
Defaulttrue
+
+
+ +Suggest reviewers based on the changes in the pull request in the walkthrough. + +### Automatic Review + +#### Enable Automatic Review + + + + + + + + + + + + + +
LocationReview > Auto Review > Automatic Review
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_review.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +If enabled, then CodeRabbit reviews new and updated pull requests automatically. For more information, see [Automatically review pull requests](https://docs.coderabbit.ai/guides/code-review-overview#review). + +If disabled, then CodeRabbit performs only reviews that you request manually. For more information on manual review commands, see [Manually request code reviews](/guides/code-review-overview#review). + +Disabling this setting also effectively disables all of the other settings listed in this section. + +#### Automatic Incremental Review + + + + + + + + + + + + + +
LocationReview > Auto Review > Automatic Incremental Review
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_review.auto_incremental_review`
Datatypeboolean
Defaulttrue
+
+
+ +If enabled, then CodeRabbit performs automatic reviews of existing pull requests when their associated branches have commits pushed to them. These incremental reviews happen in addition to the initial code review that CodeRabbit generates after the pull request is first created. + +For more information on manual review commands, see [Manually request code reviews](/guides/code-review-overview#review). + +We recommend leaving this option enabled. + +#### Base Branches {#base-branches} + + + + + + + + + + + + + +
LocationReview > Auto Review > Base Branches
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_review.base_branches`
Datatypearray
Default[]
+
+
+ +A list of branches that CodeRabbit performs automatic code reviews on, other +than the reposiorty's main branch (usually `main` or `master`.) + +For example, if you add `staging` as a base branch, then CodeRabbit automatically +reviews pull requests on both your repository's default branch and its `staging` branch. + +#### Drafts + + + + + + + + + + + + + +
LocationReview > Auto Review > Drafts
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_review.drafts`
Datatypeboolean
Defaultfalse
+
+
+ +If defined, then CodeRabbit automatically reviews pull requests marked as a draft +in your Git platform. + +#### Ignore Title Keywords + + + + + + + + + + + + + +
LocationReview > Auto Review > Ignore Title Keywords
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_review.ignore_title_keywords`
Datatypearray
Default[]
+
+
+ +Ignore reviewing if the title of the pull request contains any of these keywords (case-insensitive). + +#### Labels + + + + + + + + + + + + + +
LocationReview > Auto Review > Labels
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.auto_review.labels`
Datatypearray
Default[]
+
+
+ +If defined with at least one label, then CodeRabbit automatically reviews +only pull requests that have at least one of the labels in this list. + +In this case, you can manually request reviews of pull requests lacking a qualifying label. For more information on manual review commands, see [Manually request code reviews](/guides/code-review-overview#review). + +### Finishing Touches + +#### Docstrings + + + + + + + + + + + + + +
LocationReview > Finishing Touches > Docstrings
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.finishing_touches.docstrings.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +If enabled, then CodeRabbit can generate inline documentation for functions +added in a pull request. For more information, see [Docstrings](/finishing-touches/docstrings). + +#### Unit Tests + + + + + + + + + + + + + +
LocationReview > Finishing Touches > Unit Tests
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.finishing_touches.unit_tests.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +If enabled, then CodeRabbit can generate unit tests for code +added in a pull request. For more information, see [Unit Test Generation](/finishing-touches/unit-test-generation). + +## Chat + +### Auto Reply + + + + + + + + + + + + + +
LocationChat > Auto Reply
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`chat.auto_reply`
Datatypeboolean
Defaulttrue
+
+
+ +Enable the bot to reply automatically without requiring the user to tag it. + +### Integrations + +### Jira + + + + + + + + + + + + + +
LocationChat > Jira
Defaultauto
+
+ + + + + + + + + + + + + + + +
Field`chat.integrations.jira.usage`
Datatypestring
Default"auto"
+
+
+ +Enable the Jira integration for opening issues, etc. 'auto' disables the integration for public repositories. + +### Linear + + + + + + + + + + + + + +
LocationChat > Linear
Defaultauto
+
+ + + + + + + + + + + + + + + +
Field`chat.integrations.linear.usage`
Datatypestring
Default"auto"
+
+
+ +Enable the Linear integration for opening issues, etc. 'auto' disables the integration for public repositories. + +## Knowledge Base + +### Basic settings + +#### Opt Out + + + + + + + + + + + + + +
LocationKnowledge Base > Opt Out
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.opt_out`
Datatypeboolean
Defaultfalse
+
+
+ +Disable all knowledge base features that require data retention. If you opt out after opting in, all of your existing knowledge base data will be removed from the system. + +#### Pull Requests + + + + + + + + + + + + + +
LocationKnowledge Base > Pull Requests
Defaultauto
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.pull_requests.scope`
Datatypestring
Default"auto"
+
+
+ +Specify the scope of pull requests to use for the knowledge base. 'local' uses the repository's pull requests, 'global' uses the organization's pull requests, and 'auto' uses repository's pull requests for public repositories and organization's pull requests for private repositories. + +#### Web Search + + + + + + + + + + + + + +
LocationKnowledge Base > Web Search
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.web_search.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Enable the web search integration. + +### Issues + + + + + + + + + + + + + +
LocationKnowledge Base > Issues
Defaultauto
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.issues.scope`
Datatypestring
Default"auto"
+
+
+ +Specify the scope of git platform (GitHub/GitLab) issues to use for the knowledge base. 'local' uses the repository's issues, 'global' uses the organization's issues, and 'auto' uses repository's issues for public repositories and organization's issues for private repositories. + +### Jira + +#### Enable Jira + + + + + + + + + + + + + +
LocationKnowledge Base > Jira
Defaultauto
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.jira.usage`
Datatypestring
Default"auto"
+
+
+ +Enable the Jira knowledge base integration. 'auto' disables the integration for public repositories. + +#### Project Keys + + + + + + + + + + + + + +
LocationKnowledge Base > Project Keys
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.jira.project_keys`
Datatypearray
Default[]
+
+
+ +Specify the Jira project keys to use for the knowledge base. + +### Learnings + + + + + + + + + + + + + +
LocationKnowledge Base > Learnings
Defaultauto
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.learnings.scope`
Datatypestring
Default"auto"
+
+
+ +Specify the scope of learnings to use for the knowledge base. 'local' uses the repository's learnings, 'global' uses the organization's learnings, and 'auto' uses repository's learnings for public repositories and organization's learnings for private repositories. + +### Linear + +#### Enable Linear + + + + + + + + + + + + + +
LocationKnowledge Base > Linear
Defaultauto
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.linear.usage`
Datatypestring
Default"auto"
+
+
+ +Enable the Linear knowledge base integration. 'auto' disables the integration for public repositories. + +#### Team Keys + + + + + + + + + + + + + +
LocationKnowledge Base > Team Keys
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.linear.team_keys`
Datatypearray
Default[]
+
+
+ +Specify the Linear team keys (identifiers) to use for the knowledge base. E.g. 'ENG' + +## Code Generation + +### Code Generation Language + + + + + + + + + + + + + +
LocationCode Generation > Language
Defaulten-US
+
+ + + + + + + + + + + + + + + +
Field`code_generation.docstrings.language`
Datatypestring
Default"en-US"
+
+
+ +Set the language for docstrings by using the corresponding ISO language code. + +### Docstring Path Instructions + + + + + + + + + + + + + +
LocationCode Generation > Path Instructions
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`code_generation.docstrings.path_instructions`
Datatypearray
Default[]
+
+
+ +Provide additional guidelines for docstring generation based on file paths. + +### Unit Test Path Instructions + + + + + + + + + + + + + +
LocationCode Generation > Unit Test Generation
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`code_generation.unit_tests.path_instructions`
Datatypearray
Default[]
+
+
+ +Provide additional guidelines for unit test generation based on file paths. + +## Tools + +CodeRabbit integrates with various third-party tools for enhanced code analysis. + +### actionlint + +actionlint is a static checker for GitHub Actions workflow files. + +#### Enable actionlint + + + + + + + + + + + + + +
LocationReview > Tools > Enable actionlint
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.actionlint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +is a static checker for GitHub Actions workflow files. + +### ast-grep + +Enable ast-grep | ast-grep is a code analysis tool that helps you to find patterns in your codebase using abstract syntax trees patterns. | v0.38.1 + +#### Essential Rules + + + + + + + + + + + + + +
LocationReview > Tools > ast-grep > Essential Rules
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.ast-grep.essential_rules`
Datatypeboolean
Defaulttrue
+
+
+ +Use ast-grep essentials package. + +#### Packages + + + + + + + + + + + + + +
LocationReview > Tools > ast-grep > Packages
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.ast-grep.packages`
Datatypearray
Default[]
+
+
+ +Predefined packages to be used. + +#### Rule Dirs + + + + + + + + + + + + + +
LocationReview > Tools > ast-grep > Rule Dirs
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.ast-grep.rule_dirs`
Datatypearray
Default[]
+
+
+ +List of rules directories. + +#### Util Dirs + + + + + + + + + + + + + +
LocationReview > Tools > ast-grep > Util Dirs
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.ast-grep.util_dirs`
Datatypearray
Default[]
+
+
+ +List of utils directories. + +### Biome + +Biome is a fast formatter, linter, and analyzer for web projects. + +#### Enable Biome + + + + + + + + + + + + + +
LocationReview > Tools > Enable Biome
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.biome.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Biome is a fast formatter, linter, and analyzer for web projects. + +### Brakeman + +Brakeman is a static analysis security vulnerability scanner for Ruby on Rails applications. | v7.0.2 + +#### Enable Brakeman + + + + + + + + + + + + + +
LocationReview > Tools > Enable Brakeman
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.brakeman.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Brakeman is a static analysis security vulnerability scanner for Ruby on Rails applications. + +### Buf + +Buf offers linting for Protobuf files. + +#### Enable Buf + + + + + + + + + + + + + +
LocationReview > Tools > Enable Buf
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.buf.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Buf offers linting for Protobuf files. + +### checkmake + +checkmake is a linter for Makefiles. + +#### Enable checkmake + + + + + + + + + + + + + +
LocationReview > Tools > Enable checkmake
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.checkmake.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +checkmake is a linter for Makefiles. + +### Checkov + +Checkov is a static code analysis tool for infrastructure-as-code files. + +#### Enable Checkov + + + + + + + + + + + + + +
LocationReview > Tools > Enable Checkov
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.checkov.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Checkov is a static code analysis tool for infrastructure-as-code files. + +### CircleCI + +CircleCI tool is a static checker for CircleCI config files. + +#### Enable CircleCI + + + + + + + + + + + + + +
LocationReview > Tools > Enable CircleCI
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.circleci.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +CircleCI tool is a static checker for CircleCI config files. + +### Clippy + +Clippy is a collection of lints to catch common mistakes and improve your Rust code. + +#### Enable Clippy + + + + + + + + + + + + + +
LocationReview > Tools > Enable Clippy
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.clippy.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Clippy is a collection of lints to catch common mistakes and improve your Rust code. + +### Cppcheck + +Cppcheck is a static code analysis tool for the C and C++ programming languages. + +#### Enable Cppcheck + + + + + + + + + + + + + +
LocationReview > Tools > Enable Cppcheck
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.cppcheck.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Cppcheck is a static code analysis tool for the C and C++ programming languages. + +### detekt + +Detekt is a static code analysis tool for Kotlin files. + +#### Enable detekt + + + + + + + + + + + + + +
LocationReview > Tools > detekt > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.detekt.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Enable detekt. + +#### Config File + + + + + + + + + + + + + +
LocationReview > Tools > detekt > Config File
Default_No default_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.detekt.config_file`
Datatypestring
Default_No default_
+
+
+ +Optional path to the detekt configuration file relative to the repository. + +### dotenv-linter + +dotenv-linter is a tool for checking and fixing .env files for problems and best practices + +#### Enable dotenv-linter + + + + + + + + + + + + + +
LocationReview > Tools > Enable dotenv-linter
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.dotenvLint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +dotenv-linter is a tool for checking and fixing .env files for problems and best practices + +### ESLint + +ESLint is a static code analysis tool for JavaScript files. + +#### Enable ESLint + + + + + + + + + + + + + +
LocationReview > Tools > Enable ESLint
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.eslint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +ESLint is a static code analysis tool for JavaScript files. + +### GitHub Checks + +GitHub Checks integration configuration. + +#### Enable GitHub Checks + + + + + + + + + + + + + +
LocationReview > Tools > GitHub Checks > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.github-checks.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Enable integration, defaults to true + +#### Timeout Ms + + + + + + + + + + + + + +
LocationReview > Tools > GitHub Checks > Timeout Ms
Default90000
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.github-checks.timeout_ms`
Datatypenumber
Default90000
+
+
+ +Time in milliseconds to wait for all GitHub Checks to conclude. + +### Gitleaks + +Gitleaks is a secret scanner. + +#### Enable Gitleaks + + + + + + + + + + + + + +
LocationReview > Tools > Enable Gitleaks
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.gitleaks.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Gitleaks is a secret scanner. + +### golangci-lint + +golangci-lint is a fast linters runner for Go. + +#### Enable golangci-lint + + + + + + + + + + + + + +
LocationReview > Tools > golangci-lint > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.golangci-lint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Enable golangci-lint. + +#### Config File + + + + + + + + + + + + + +
LocationReview > Tools > golangci-lint > Config File
Default_No default_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.golangci-lint.config_file`
Datatypestring
Default_No default_
+
+
+ +Optional path to the golangci-lint configuration file relative to the repository. Useful when the configuration file is named differently than the default '.golangci.yml', '.golangci.yaml', '.golangci.toml', '.golangci.json'. + +### Hadolint + +Hadolint is a Dockerfile linter. + +#### Enable Hadolint + + + + + + + + + + + + + +
LocationReview > Tools > Enable Hadolint
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.hadolint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Hadolint is a Dockerfile linter. + +### HTMLHint + +HTMLHint is a static code analysis tool for HTML files. + +#### Enable HTMLHint + + + + + + + + + + + + + +
LocationReview > Tools > HTMLHint > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.htmlhint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Enable HTMLHint. + +#### Config File + + + + + + + + + + + + + +
LocationReview > Tools > HTMLHint > Config File
Default_No default_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.htmlhint.config_file`
Datatypestring
Default_No default_
+
+
+ +Optional path to the HTMLHint configuration file relative to the repository. This is useful when the configuration file is named differently than the default '.htmlhintrc'. + +### LanguageTool + +LanguageTool is a style and grammar checker for 30+ languages. + +#### Disabled Categories + + + + + + + + + + + + + +
LocationReview > Tools > LanguageTool > Disabled Categories
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.languagetool.disabled_categories`
Datatypearray
Default[]
+
+
+ +IDs of categories to be disabled. Note: TYPOS, TYPOGRAPHY, and CASING are always disabled. + +#### Disabled Rules + + + + + + + + + + + + + +
LocationReview > Tools > LanguageTool > Disabled Rules
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.languagetool.disabled_rules`
Datatypearray
Default[]
+
+
+ +IDs of rules to be disabled. Note: EN_UNPAIRED_BRACKETS, and EN_UNPAIRED_QUOTES are always disabled. + +#### Enable LanguageTool + + + + + + + + + + + + + +
LocationReview > Tools > LanguageTool > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.languagetool.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Enable LanguageTool + +#### Enabled Categories + + + + + + + + + + + + + +
LocationReview > Tools > LanguageTool > Enabled Categories
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.languagetool.enabled_categories`
Datatypearray
Default[]
+
+
+ +IDs of categories to be enabled. + +#### Enabled Only + + + + + + + + + + + + + +
LocationReview > Tools > LanguageTool > Enabled Only
Defaultfalse
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.languagetool.enabled_only`
Datatypeboolean
Defaultfalse
+
+
+ +Only the rules and categories whose IDs are specified with 'enabledRules' or 'enabledCategories' are enabled. + +#### Enabled Rules + + + + + + + + + + + + + +
LocationReview > Tools > LanguageTool > Enabled Rules
Default_Empty array_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.languagetool.enabled_rules`
Datatypearray
Default[]
+
+
+ +IDs of rules to be enabled. The rule won't run unless 'level' is set to a level that activates the rule. + +#### Level + + + + + + + + + + + + + +
LocationReview > Tools > LanguageTool > Level
Defaultdefault
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.languagetool.level`
Datatypestring
Default"default"
+
+
+ +If set to 'picky', additional rules will be activated, i.e. rules that you might only find useful when checking formal text. + +### Luacheck + +Configuration for Lua code linting to ensure code quality + +#### Enable Luacheck + + + + + + + + + + + + + +
LocationReview > Tools > Enable Luacheck
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.luacheck.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Luacheck helps maintain consistent and error-free Lua code + +### markdownlint + +markdownlint-cli2 is a static analysis tool to enforce standards and consistency for Markdown files. + +#### Enable markdownlint + + + + + + + + + + + + + +
LocationReview > Tools > Enable markdownlint
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.markdownlint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +markdownlint-cli2 is a static analysis tool to enforce standards and consistency for Markdown files. + +### OXC + +OXC is a JavaScript/TypeScript linter written in Rust. + +#### Enable OXC + + + + + + + + + + + + + +
LocationReview > Tools > Enable OXC
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.oxc.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +OXC is a JavaScript/TypeScript linter written in Rust. + +### PHPStan + +PHPStan is a tool to analyze PHP code. + +#### Enable PHPStan + + + + + + + + + + + + + +
LocationReview > Tools > PHPStan > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.phpstan.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +PHPStan requires [config file](https://phpstan.org/config-reference#config-file) in your repository root. Please ensure that this file contains the `paths:` parameter. + +#### Level + + + + + + + + + + + + + +
LocationReview > Tools > PHPStan > Level
Defaultdefault
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.phpstan.level`
Datatypestring
Default"default"
+
+
+ +Specify the [rule level](https://phpstan.org/user-guide/rule-levels) to run. This setting is ignored if your configuration file already has a `level:` parameter. + +### PMD + +PMD is an extensible multilanguage static code analyzer. It’s mainly concerned with Java. + +#### Enable PMD + + + + + + + + + + + + + +
LocationReview > Tools > PMD > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.pmd.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Enable PMD. + +#### Config File + + + + + + + + + + + + + +
LocationReview > Tools > PMD > Config File
Default_No default_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.pmd.config_file`
Datatypestring
Default_No default_
+
+
+ +Optional path to the PMD configuration file relative to the repository. + +### Prisma Schema Linting + +Configuration for Prisma Schema linting to ensure schema file quality + +#### Enable Prisma Schema Linting + + + + + + + + + + + + + +
LocationReview > Tools > Enable Prisma Schema Linting
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.prismaLint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Prisma Schema linting helps maintain consistent and error-free schema files + +### Pylint + +Pylint is a Python static code analysis tool. + +#### Enable Pylint + + + + + + + + + + + + + +
LocationReview > Tools > Enable Pylint
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.pylint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Pylint is a Python static code analysis tool. + +### Regal + +Regal is a linter and language server for Rego. + +#### Enable Regal + + + + + + + + + + + + + +
LocationReview > Tools > Enable Regal
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.regal.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Regal is a linter and language server for Rego. + +### RuboCop + +RuboCop is a Ruby static code analyzer (a.k.a. linter ) and code formatter. + +#### Enable RuboCop + + + + + + + + + + + + + +
LocationReview > Tools > Enable RuboCop
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.rubocop.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +RuboCop is a Ruby static code analyzer (a.k.a. linter ) and code formatter. + +### Ruff + +Ruff is a Python linter and code formatter. + +#### Enable Ruff + + + + + + + + + + + + + +
LocationReview > Tools > Enable Ruff
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.ruff.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Ruff is a Python linter and code formatter. + +### Semgrep + +Semgrep is a static analysis tool designed to scan code for security vulnerabilities and code quality issues. + +#### Enable Semgrep + + + + + + + + + + + + + +
LocationReview > Tools > Semgrep > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.semgrep.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Enable Semgrep. + +#### Config File + + + + + + + + + + + + + +
LocationReview > Tools > Semgrep > Config File
Default_No default_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.semgrep.config_file`
Datatypestring
Default_No default_
+
+
+ +Optional path to the Semgrep configuration file relative to the repository. + +### ShellCheck + +ShellCheck is a static analysis tool that finds bugs in your shell scripts. + +#### Enable ShellCheck + + + + + + + + + + + + + +
LocationReview > Tools > Enable ShellCheck
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.shellcheck.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +ShellCheck is a static analysis tool that finds bugs in your shell. + +### Shopify Theme Check + +Configuration for Shopify Theme Check to ensure theme quality and best practices + +#### Enable Shopify Theme Check + + + + + + + + + + + + + +
LocationReview > Tools > Enable Shopify Theme Check
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.shopifyThemeCheck.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +A linter for Shopify themes that helps you follow Shopify theme & Liquid best practices + +### SQLFluff + +SQLFluff is an open source, dialect-flexible and configurable SQL linter. + +#### Enable SQLFluff + + + + + + + + + + + + + +
LocationReview > Tools > Enable SQLFluff
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.sqlfluff.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +SQLFluff is an open source, dialect-flexible and configurable SQL linter. + +### SwiftLint + +SwiftLint integration configuration object. + +#### Enable SwiftLint + + + + + + + + + + + + + +
LocationReview > Tools > SwiftLint > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.swiftlint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Enable SwiftLint. + +#### Config File + + + + + + + + + + + + + +
LocationReview > Tools > SwiftLint > Config File
Default_No default_
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.swiftlint.config_file`
Datatypestring
Default_No default_
+
+
+ +Optional path to the SwiftLint configuration file relative to the repository. This is useful when the configuration file is named differently than the default '.swiftlint.yml' or '.swiftlint.yaml'. + +### YAMLlint + +YAMLlint is a linter for YAML files. + +#### Enable YAMLlint + + + + + + + + + + + + + +
LocationReview > Tools > Enable YAMLlint
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.yamllint.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +YAMLlint is a linter for YAML files. diff --git a/docs/reference/yaml-template.md b/docs/reference/yaml-template.md new file mode 100644 index 00000000..6a670197 --- /dev/null +++ b/docs/reference/yaml-template.md @@ -0,0 +1,186 @@ +--- +title: Configuration file template +--- + +You can use the following template as a basis for a new `.coderabbit.yaml` configuration file at the root level of your repository. + +If used as-is as a `.coderabbit.yaml` file, then this template sets the default, recommended values for [all CodeRabbit repository options](/reference/configuration). You can then update the values to best suit your team's code-review needs. + +For more information about using a `.coderabbit.yaml` file, see [Add a configuration file](/getting-started/configure-coderabbit). + +For a general overview of CodeRabbit configuration, see [Configure CodeRabbit](/guides/configuration-overview). + +```yaml +# yaml-language-server: $schema=https://storage.googleapis.com/coderabbit_public_assets/schema.v2.json + +language: en-US +tone_instructions: "" +early_access: true +enable_free_tier: true +reviews: + profile: chill + request_changes_workflow: false + high_level_summary: true + high_level_summary_placeholder: "@coderabbitai summary" + high_level_summary_in_walkthrough: false + auto_title_placeholder: "@coderabbitai" + auto_title_instructions: "" + review_status: true + commit_status: true + fail_commit_status: false + collapse_walkthrough: false + changed_files_summary: true + sequence_diagrams: true + assess_linked_issues: true + related_issues: true + related_prs: true + suggested_labels: true + auto_apply_labels: false + suggested_reviewers: true + auto_assign_reviewers: false + poem: true + labeling_instructions: + - label: "" + instructions: "" + path_filters: [] + path_instructions: + - path: "" + instructions: "" + abort_on_close: true + disable_cache: false + auto_review: + enabled: true + auto_incremental_review: true + ignore_title_keywords: [] + labels: [] + drafts: false + base_branches: [] + finishing_touches: + docstrings: + enabled: true + unit_tests: + enabled: true + tools: + ast-grep: + rule_dirs: [] + util_dirs: [] + essential_rules: true + packages: [] + shellcheck: + enabled: true + ruff: + enabled: true + markdownlint: + enabled: true + github-checks: + enabled: true + timeout_ms: 90000 + languagetool: + enabled: true + enabled_rules: [] + disabled_rules: [] + enabled_categories: [] + disabled_categories: [] + enabled_only: false + level: default + biome: + enabled: true + hadolint: + enabled: true + swiftlint: + enabled: true + config_file: "" + phpstan: + enabled: true + level: default + golangci-lint: + enabled: true + config_file: "" + yamllint: + enabled: true + gitleaks: + enabled: true + checkov: + enabled: true + detekt: + enabled: true + config_file: "" + eslint: + enabled: true + rubocop: + enabled: true + buf: + enabled: true + regal: + enabled: true + actionlint: + enabled: true + pmd: + enabled: true + config_file: "" + cppcheck: + enabled: true + semgrep: + enabled: true + config_file: "" + circleci: + enabled: true + clippy: + enabled: true + sqlfluff: + enabled: true + prismaLint: + enabled: true + pylint: + enabled: true + oxc: + enabled: true + shopifyThemeCheck: + enabled: true + luacheck: + enabled: true + brakeman: + enabled: true + dotenvLint: + enabled: true + htmlhint: + enabled: true + checkmake: + enabled: true +chat: + auto_reply: true + integrations: + jira: + usage: auto + linear: + usage: auto +knowledge_base: + opt_out: false + web_search: + enabled: true + code_guidelines: + enabled: true + filePatterns: [] + learnings: + scope: auto + issues: + scope: auto + jira: + usage: auto + project_keys: [] + linear: + usage: auto + team_keys: [] + pull_requests: + scope: auto +code_generation: + docstrings: + language: en-US + path_instructions: + - path: "" + instructions: "" + unit_tests: + path_instructions: + - path: "" + instructions: "" +``` diff --git a/docs/tools/flake8.md b/docs/tools/flake8.md new file mode 100644 index 00000000..b0a29761 --- /dev/null +++ b/docs/tools/flake8.md @@ -0,0 +1,36 @@ +--- +title: Flake8 +sidebar_label: Flake8 +description: CodeRabbit's guide to Flake8. +--- + +```mdx-code-block +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; + + +``` + +[Flake8](https://flake8.pycqa.org/) is a Python linting utility that wraps PyFlakes, pycodestyle, and Mccabe to check your Python code for style and logical errors. + +## Supported Files + +Flake8 will run on files with the following extensions: + +- `*.py` + +## Features + +Flake8 can detect many issues such as: + +- Style violations (PEP 8) +- Logical errors and unused imports +- Code complexity issues +- Syntax errors +- And many more + +## Links + +- [Flake8 Official Website](https://flake8.pycqa.org/) +- [Flake8 GitHub Repository](https://github.com/pycqa/flake8) +- [Flake8 Documentation](https://flake8.pycqa.org/en/latest/) +- [Flake8 Configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) diff --git a/docs/tools/list.md b/docs/tools/list.md index 6092e082..b7a103b0 100644 --- a/docs/tools/list.md +++ b/docs/tools/list.md @@ -32,11 +32,11 @@ For an overview of how CodeRabbit uses these tools when generating code reviews, | Lua | [Luacheck][Luacheck] | Code Quality | | Makefile | [Checkmake][Checkmake] | Code Quality | | Markdown | [markdownlint][markdownlint], [LanguageTool][LanguageTool] | Code Quality, Grammar Checking | -| PHP | [PHPStan][PHPStan] | Code Quality | +| PHP | [PHPStan][PHPStan], [PHPMD][PHPMD], [PHPCS][PHPCS] | Code Quality | | Plaintext | [LanguageTool][LanguageTool] | Grammar and Spell Checking | | Java | [PMD][PMD] | Code Quality | | Protobuf | [Buf][Buf] | Code Quality | -| Python | [Ruff][Ruff], [Pylint][Pylint] | Code Quality | +| Python | [Ruff][Ruff], [Pylint][Pylint], [Flake8][Flake8] | Code Quality | | Regal | [Regal][Regal] | Code Quality | | Ruby | [RuboCop][RuboCop], [Brakeman][Brakeman] | Code Quality, Code Security | | Rust | [Clippy][Clippy] | Code Quality | @@ -84,3 +84,6 @@ For an overview of how CodeRabbit uses these tools when generating code reviews, [DotenvLinter]: /tools/dotenv.md [HTMLHint]: /tools/htmlhint.md [Checkmake]: /tools/checkmake.md +[PHPMD]: /tools/phpmd.md +[PHPCS]: /tools/phpcs.md +[Flake8]: /tools/flake8.md diff --git a/docs/tools/phpcs.md b/docs/tools/phpcs.md new file mode 100644 index 00000000..468e23dc --- /dev/null +++ b/docs/tools/phpcs.md @@ -0,0 +1,56 @@ +--- +title: PHPCS +sidebar_label: PHPCS +description: CodeRabbit's guide to PHPCS. +--- + +```mdx-code-block +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; + + +``` + +[PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) (PHP CodeSniffer) is a development tool that ensures your code conforms to a coding standard. It is an essential tool for any development team that wants to ensure their code is consistent and follows best practices. + +## Files + +PHPCS will run on files with the following extensions: + +- `.php` + +## Features + +PHPCS can detect and fix various coding standard violations including: + +- **PSR Standards**: Enforces PSR-1, PSR-2, PSR-12, and other coding standards +- **Custom Standards**: Supports custom coding standards and rules +- **Auto-fixing**: Can automatically fix many coding standard violations +- **Custom Rules**: Allows creation of custom sniff rules +- **Multiple Standards**: Can enforce multiple coding standards simultaneously + +## Popular Standards + +PHPCS supports many coding standards including: + +- **PSR-1**: Basic Coding Standard +- **PSR-2**: Coding Style Guide +- **PSR-12**: Extended Coding Style +- **Squiz**: Squiz Labs coding standard +- **PEAR**: PEAR coding standard +- **Zend**: Zend Framework coding standard + +## Configuration + +PHPCS requires a configuration file to run. CodeRabbit will only run PHPCS if one of the following configuration files is found: + +- `phpcs.xml` - XML configuration file +- `phpcs.xml.dist` - Distributed XML configuration file + +CodeRabbit will not run PHPCS if no configuration file is found. + +## Links + +- [PHPCS GitHub Repository](https://github.com/squizlabs/PHP_CodeSniffer) +- [PHPCS Documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki) +- [Available Coding Standards](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standards) +- [Creating Custom Standards](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standards#creating-a-coding-standard) diff --git a/docs/tools/phpmd.md b/docs/tools/phpmd.md new file mode 100644 index 00000000..84df5b11 --- /dev/null +++ b/docs/tools/phpmd.md @@ -0,0 +1,44 @@ +--- +title: PHPMD +sidebar_label: PHPMD +description: CodeRabbit's guide to PHPMD. +--- + +```mdx-code-block +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; + + +``` + +[PHPMD](https://phpmd.org/) (PHP Mess Detector) is a static analysis tool for PHP that detects potential problems in your code such as possible bugs, suboptimal code, overcomplicated expressions, and unused parameters, variables, methods, and classes. + +## Files + +PHPMD will run on files with the following extensions: + +- `.php` + +## Features + +PHPMD can detect various code quality issues including: + +- **Clean Code Rules**: Detects code smells and violations of clean code principles +- **Controversial Rules**: Identifies potentially problematic code patterns +- **Design Rules**: Finds design-related issues and architectural problems +- **Naming Rules**: Checks for naming convention violations +- **Unused Code Rules**: Detects unused variables, parameters, methods, and classes +- **Size Rules**: Identifies overly complex methods and classes + +### Review Mode Behavior + +CodeRabbit's review mode affects which PHPMD rules are applied: + +- **Chill Mode**: Only checks for unused code (`unusedcode` rule set) +- **Nitpick Mode**: Checks all rule sets including clean code, code size, controversial rules, design issues, naming conventions, and unused code (`cleancode,codesize,controversial,design,naming,unusedcode`) + +## Links + +- [PHPMD Official Website](https://phpmd.org/) +- [PHPMD GitHub Repository](https://github.com/phpmd/phpmd) +- [PHPMD Documentation](https://phpmd.org/documentation/index.html) +- [Available Rules](https://phpmd.org/rules/index.html) diff --git a/sidebars.ts b/sidebars.ts index 3d56f2b7..5b42e112 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -79,7 +79,11 @@ const sidebars: SidebarsConfig = { collapsed: true, label: "Configure CodeRabbit", items: [ + "guides/configuration-overview", + "guides/organization-settings", + "guides/repository-settings", "getting-started/configure-coderabbit", + "guides/initial-configuration", "integrations/knowledge-base", "guides/review-instructions", "tools/tools", @@ -162,6 +166,8 @@ const sidebars: SidebarsConfig = { href: "https://api.coderabbit.ai/api/swagger/", }, "reference/review-commands", + "reference/configuration", + "reference/yaml-template", { type: "category", label: "Supported tools", diff --git a/static/img/guides/score-card-report-result.png b/static/img/guides/score-card-report-result.png new file mode 100644 index 00000000..15b51539 Binary files /dev/null and b/static/img/guides/score-card-report-result.png differ diff --git a/static/img/guides/score-card-result-comment.png b/static/img/guides/score-card-result-comment.png new file mode 100644 index 00000000..1ea43248 Binary files /dev/null and b/static/img/guides/score-card-result-comment.png differ diff --git a/static/img/guides/score-card-trigger-comment.png b/static/img/guides/score-card-trigger-comment.png new file mode 100644 index 00000000..2f690948 Binary files /dev/null and b/static/img/guides/score-card-trigger-comment.png differ diff --git a/static/img/guides/where-score-report-prompt-go.png b/static/img/guides/where-score-report-prompt-go.png new file mode 100644 index 00000000..3b26a1f1 Binary files /dev/null and b/static/img/guides/where-score-report-prompt-go.png differ diff --git a/static/img/reference/path-instructions.png b/static/img/reference/path-instructions.png new file mode 100644 index 00000000..adcb5884 Binary files /dev/null and b/static/img/reference/path-instructions.png differ diff --git a/static/schema/schema.v2.json b/static/schema/schema.v2.json index e7452e64..8e5e848c 100644 --- a/static/schema/schema.v2.json +++ b/static/schema/schema.v2.json @@ -466,7 +466,7 @@ "maximum": 900000, "minimum": 0, "default": 90000, - "description": "Time in milliseconds to wait for all GitHub Checks to conclude." + "description": "Time in milliseconds to wait for all GitHub Checks to conclude. Default is 90 seconds." } }, "additionalProperties": false, @@ -604,6 +604,32 @@ "default": {}, "description": "PHPStan is a tool to analyze PHP code." }, + "phpmd": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Enable PHPMD | PHPMD is a tool to find potential problems in PHP code. | v2.15.0" + } + }, + "additionalProperties": false, + "default": {}, + "description": "PHPMD is a tool to find potential problems in PHP code." + }, + "phpcs": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Enable PHP CodeSniffer | PHP CodeSniffer is a PHP linter and coding standard checker. | v3.7.2" + } + }, + "additionalProperties": false, + "default": {}, + "description": "PHP CodeSniffer is a PHP linter and coding standard checker." + }, "golangci-lint": { "type": "object", "properties": { @@ -697,10 +723,6 @@ "type": "boolean", "default": true, "description": "Enable Flake8 | Flake8 is a Python linter that wraps PyFlakes, pycodestyle and Ned Batchelder's McCabe script. | v7.2.0" - }, - "config_file": { - "type": "string", - "description": "Optional path to the Flake8 configuration file relative to the repository. This is useful when the configuration file is named differently than the default '.flake8' or 'setup.cfg'." } }, "additionalProperties": false, @@ -943,10 +965,6 @@ "type": "boolean", "default": true, "description": "Enable HTMLHint | HTMLHint is a static code analysis tool for HTML files. | Enable HTMLHint integration. | v1.5.0" - }, - "config_file": { - "type": "string", - "description": "Optional path to the HTMLHint configuration file relative to the repository. This is useful when the configuration file is named differently than the default '.htmlhintrc'." } }, "additionalProperties": false, @@ -1047,7 +1065,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enabled | Enable CodeRabbit to enforce your organisation's coding standards during reviews." + "description": "Enabled | Enable CodeRabbit to enforce your organization's coding standards during reviews." }, "filePatterns": { "type": "array", @@ -1055,12 +1073,12 @@ "type": "string" }, "default": [], - "description": "File Patterns | Specify files for your coding guideline documents in this section. CodeRabbit will scan these files to understand your team's standards and apply them during code reviews. Multiple files supported. File names are case-sensitive. Common files like: (**/.cursorrules, .github/copilot-instructions.md, **/CLAUDE.md, **/.cursor/rules/*, **/.windsurfrules, **/.clinerules/*, **/.rules/*) are included by default." + "description": "File Patterns | Specify files for your coding guideline documents in this section. CodeRabbit will scan these files to understand your team's standards and apply them during code reviews. Multiple files supported. File names are case-sensitive. Common files like: (**/.cursorrules, .github/copilot-instructions.md, **/CLAUDE.md, **/GEMINI.md, **/.cursor/rules/*, **/.windsurfrules, **/.clinerules/*, **/.rules/*, **/AGENT.md) are included by default." } }, "additionalProperties": false, "default": {}, - "description": "CodeRabbit will analyse and learn from your organisation's code guidelines, which you can mention in the file patterns section. These guidelines will then be used to conduct thorough code reviews." + "description": "CodeRabbit will analyse and learn from your organization's code guidelines, which you can mention in the file patterns section. These guidelines will then be used to conduct thorough code reviews." }, "learnings": { "type": "object",