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/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/initial-configuration.md b/docs/guides/initial-configuration.md new file mode 100644 index 00000000..3df69e8b --- /dev/null +++ b/docs/guides/initial-configuration.md @@ -0,0 +1,199 @@ +--- +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} + +These settings direct CodeRabbit to treat various files and and locations in +your repository differently. + +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/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..6d713312 --- /dev/null +++ b/docs/reference/yaml-template.md @@ -0,0 +1,184 @@ +--- +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: true + enabled: true + config_file: '' + checkmake: + enabled: true +chat: + auto_reply: true + integrations: + jira: + usage: auto + linear: + usage: auto +knowledge_base: + opt_out: false + web_search: + enabled: true + 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/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/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