diff --git a/docs/changelog.md b/docs/changelog.md index 656a0b5f..6a21a8ab 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -5,6 +5,30 @@ description: The latest updates and changes to CodeRabbit. sidebar_position: 13 --- +## May 19, 2025 + +### Lua Support with Luacheck + +We're excited to announce enhanced support for Lua code analysis with [Luacheck](https://github.com/mpeterv/luacheck), a powerful static analyzer and linter for Lua code. + +## May 14, 2025 + +### CodeRabbit for VS Code, Cursor, and Windsurf Is Here ๐ŸŽ‰ + +We're thrilled to announce that CodeRabbit's AI code reviews have officially landed inside **VS Code and all its forks, including Cursor and Windsurf!** No more review bottlenecks or context switches: now you can get _instant, inline feedback right in your editor, completely free._ + +**Why you'll love it:** + +- ๐Ÿ“ **Inline Code Reviews**: Senior-dev-level annotation on every line. CodeRabbit becomes your AI pair programmer, annotating staged & unstaged commits before you even open a PR. +- ๐Ÿš€ **Built for Flow, Not Friction**: Code, review, commitโ€”rise & repeat without breaking your flow state. Reviews run automatically on every commit so you ship faster. +- ๐Ÿ› ๏ธ **Fix-with-AI**: One-Click Fix for quick tweaks; "Fix with AI" hands off more complex suggestions to your favorite coding agent, complete with full context. +- ๐Ÿงฉ **Compatible with Cursor, Windsurf & Language-Agnostic**: Works out of the box on VS Code, Cursor, Windsurf. Supports Java, JavaScript, PHP, Python, TypeScript, Go, Ruby, and more. + +Pair these IDE-embedded reviews with our deeper Git-platform reviews for a multi-layered approach that catches more bugs and cuts down overall review time. + +- [Join the launch discussion on Discord](https://discord.com/channels/1134356397673414807/1145813948193575023/1372210767838842950) +- [Install the CodeRabbit VSCode Extension](https://coderabbit.link/vscode) + ## April 19, 2025 ### Docstring Path Instructions @@ -66,7 +90,7 @@ We're thrilled to introduce agentic planning on GitHub for CodeRabbit chat as Ge We've expanded our static analysis capabilities with two new tools: -- **oxlint**: A high-performance JavaScript/TypeScript linter written in Rust. +- **Oxlint**: A high-performance JavaScript/TypeScript linter written in Rust. - **Prisma Lint**: A dedicated linter for Prisma schema files to help enforce consistent conventions and best practices. Both tools can be configured through their respective config files or through CodeRabbit's settings page. See our [tools documentation](https://docs.coderabbit.ai/tools/) for more details. @@ -124,8 +148,8 @@ We're thrilled to introduce agentic planning on GitHub for CodeRabbit chat as an We are continually expanding our support for static analysis tools. We've recently added support for: - SQLFluff -- Added oxlint for faster linting - - oxlint is a blazingly fast JavaScript/TypeScript linter written in Rust +- Added Oxlint for faster linting + - Oxlint is a blazingly fast JavaScript/TypeScript linter written in Rust - Replaces ESLint for basic linting while maintaining ESLint for more complex rules - Up to 50-100x faster than traditional ESLint diff --git a/docs/faq.md b/docs/faq.md index 1cb42735..f4158154 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -31,10 +31,10 @@ CodeRabbit works with all programming languages, with varying proficiency based - - No persistent code storage - - Temporary cloning during review only - Complete data isolation - - Immediate disposal post-review + - Caching of encrypted code and dependency archives for faster reviews + - Code indexing in which we store vector representations of code for efficient code base context + - Both caching and code indexing can be disabled which means we store nothing post-review - Uses only public datasets @@ -92,7 +92,7 @@ Email field and click Update to save your changes. ### Usage and Configuration - **Language Settings**: Configure review language in repository settings -- **Review Rules**: Customize via [Review Instructions](/guides/review-instructions) +- **Review Rules**: Customize via [review instructions](/guides/review-instructions) - **Branch Selection**: Default branch reviews enabled by default (configurable) ### Access & Permissions @@ -108,7 +108,7 @@ Interact with CodeRabbit by: 1. Replying directly to CodeRabbit comments 2. Tagging `@coderabbitai` in PR discussions 3. Adding review comments for specific lines -4. Customize via [Review Instructions](/guides/review-instructions) +4. Customize via [review instructions](/guides/review-instructions) :::tip Collaboration Mode When team members are active in PRs, use `@coderabbitai` to engage the bot. diff --git a/docs/guides/about-vscode.md b/docs/guides/about-vscode.md new file mode 100644 index 00000000..3e484ffe --- /dev/null +++ b/docs/guides/about-vscode.md @@ -0,0 +1,37 @@ +--- +title: Review local changes +description: How to review your code with the VSCode extension. +slug: /code-editors +sidebar_label: Overview +--- + +This page is about the CodeRabbit VSCode extension. For a broader overview of CodeRabbit, see [Introduction](/). + +## About the VSCode extension + +The CodeRabbit VSCode extension lets you apply a limited subset of CodeRabbitโ€™s code-review features to your local development environment, directly from the VSCode IDE. It also works with other text editors that are able to install and use VSCode extensions, such as Cursor and Windsurf. + +You can use the extension on its own, or you can use it to complement your local development on a repository whose remote has CodeRabbit installed. + +The extension is intended to let you use the power of CodeRabbit to rapidly tune and tidy your code changes locally, before you publish your changes to your team's remote repository and start a more thorough code review. + +## Features + +The extension includes the following features: + +- Automatic code reviews on every local Git commit. +- Manually requested reviews of local code changes. +- One-click application of simpler suggested code fixes. +- Integration with AI coding agents, including Copilot and Claude Code, to help you resolve more complex suggestions. +- Full compatibility with text editors derived from VSCode, including Cursor and Windsurf. + +## Price and limitations + +This extension is free to install and use, and works with any tier of CodeRabbit account. Rate limits apply to the number of local reviews that you can request per hour. + +The extension makes only basic CodeRabbit review features available, with default settings applied. Advanced CodeRabbit features, such as interactive chat and project learnings, aren't available through the VSCode extension. These features are available only by [integrating CodeRabbit on your remote repository](/platforms), and then allowing CodeRabbit to review pull requests. + +## What's next + +- [Install the VSCode extension](/guides/install-vscode) +- [Use the VSCode extension](/guides/use-vscode) diff --git a/docs/guides/code-review-best-practices.md b/docs/guides/code-review-best-practices.md new file mode 100644 index 00000000..83bd8abb --- /dev/null +++ b/docs/guides/code-review-best-practices.md @@ -0,0 +1,42 @@ +--- +title: Code review best practices +description: Best practices for managing CodeRabbit code reviews. +sidebar_label: Best practices +--- + +This page lists best practices for performing code reviews with CodeRabbit. + +For more information about working with +CodeRabbit through chat, see [Control and manage code reviews](/guides/commands). + +For a CodeRabbit command reference, see [Code review command reference](/reference/review-commands). + +## Recommended code-review workflow + +- Start with `@coderabbitai review` for checking new changes. +- Use `@coderabbitai full review` when major changes require a fresh perspective. +- Generate summaries after significant updates using `@coderabbitai summary`. + +## Managing large changes + +- Use `@coderabbitai pause` before making multiple commits. +- Resume reviews with `@coderabbitai resume` when ready. +- Consider `@coderabbitai full review` after substantial changes. + +## Documentation flow + +- Run `@coderabbitai generate docstrings` after finalizing function implementations. +- Learn more about [docstring generation](/finishing-touches/docstrings). + +## Overall tips + +- Commands are case-insensitive (`@coderabbitai REVIEW` works the same as `@coderabbitai review`). +- Commands can be issued by anyone with write access to the repository. +- Multiple commands can be used in sequence as needed. +- Use `@coderabbitai configuration` to export your settings before making changes. + +## Command response time + +- Most commands (pause, resume, ignore) take effect immediately. +- Review commands typically complete within a few minutes, depending on PR size. +- Docstring generation time varies based on the number of functions. diff --git a/docs/guides/code-review-overview.md b/docs/guides/code-review-overview.md new file mode 100644 index 00000000..cd511c76 --- /dev/null +++ b/docs/guides/code-review-overview.md @@ -0,0 +1,89 @@ +--- +title: Review pull requests +description: An overview of CodeRabbit's core code review features. +sidebar_label: Overview +--- + +The central feature of CodeRabbit is its ability to proactively review +new pull requests on your code repository. + +CodeRabbit reviews take the form of pull request comments that +include summaries, analyses, and initial critiques of the proposed changes. +This information, usually added to pull requests within minutes, can help your team perform more rapid, better-informed code reviews. + +The following sections present an overview of this feature. For a hands-on example that lets you experience a CodeRabbit code review using +a real repository, see [Quickstart](/getting-started/quickstart). + +## Automatically review pull requests {#review} + +After you [integrate CodeRabbit with your repository](/platforms), CodeRabbit proceeds +to automatically review every subsequent pull request, as soon as each one is created. + +CodeRabbit performs code reviews by attaching comments to the pull request. +These comments contain detailed summaries and analyses of the changes, +as well as listing out problems or areas for potential improvement that it found. + +CodeRabbit uses [a variety of open-source linters and security tools](/tools) and a custom +code verification agent to provide this analysis. CodeRabbit +also consults several models to further analyze and critique the proposed changes, +using all of the content of your repository as context. The code-review comment that CodeRabbit attaches +to your pull request synthesizes and summarizes all of the information collected from these different sources. + +For more information about the graph analysis that CodeRabbit includes with its reviews +when available, see [CodeRabbit Code Graph Analysis](/integrations/code-graph-analysis). + +### Events that trigger automated reviews {#events} + +By default, the following activity in your repository triggers CodeRabbit to +perform a code review: + +- If CodeRabbit sees a new pull request, then it immediately performs a full review + of the proposed code changes. +- If an open pull request that CodeRabbit has already reviewed gets modified with another + commit, then CodeRabbit performs an incremental review that focuses on the new commit. + +## Interact with CodeRabbit reviews {#interact} + +After CodeRabbit attaches its initial code-review comment to a pull request, you can +directly interact with CodeRabbit by mentioning its username, `@coderabbitai`, in comments +that you post to the pull request. + +These interactions can serve several purposes: + +- Free-form discussion about the pull request and the ongoing code review. +- Commands to have CodeRabbit perform specific actions regarding the code review. +- Prompts to have CodeRabbit generate its own improvements to the branch under review. + +### Chat with CodeRabbit {#chat} + +You can have open-ended, natural-language discussion with CodeRabbit during a code review, treating it +as an LLM-powered chatbot that has your entire code repository available for context. For more information, see [CodeRabbit Chat](/guides/agent_chat). + +### Manage CodeRabbit review behavior {#manage} + +CodeRabbit recognizes a variety of keyword-based commands that let you control its +behavior during a code review, including the following: + +- Pause or resume automated reviews of the pull request. +- Manually request a review, when automated reviews are paused. +- Resolve all open comments authored by CodeRabbit. + +For more information, see [Control and manage code reviews](/guides/commands). + +### Generate improvements {#generate} + +You can command CodeRabbit to generate improvements to the branch under review. +CodeRabbit accomplishes this by publishing a new branch based on the branch under review, +and creating a new pull request for your own review. + +Available code-generation commands let you request the following from CodeRabbit: + +- Implement the suggestions for improvements that CodeRabbit has made in its earlier code review comments. +- Generate inline documentation for any undocumented functions that this pull request proposes to add. + +For more information, see [Generate improvements](/guides/generate-improvements). + +## What's next {#whats-next} + +- [Control and manage code reviews](/guides/commands) +- [Generate code improvements](/guides/generate-improvements) diff --git a/docs/guides/code-review-troubleshooting.md b/docs/guides/code-review-troubleshooting.md new file mode 100644 index 00000000..72539453 --- /dev/null +++ b/docs/guides/code-review-troubleshooting.md @@ -0,0 +1,17 @@ +--- +title: Code review troubleshooting +description: Troubleshooting CodeRabbit code reviews. +sidebar_label: Troubleshooting +--- + +This page is about troubleshooting interactive code review sessions with CodeRabbit. For more information about working with +CodeRabbit through chat, see [Control and manage code reviews](/guides/commands). + +If a CodeRabbit command doesn't seem to work: + +1. Check that you have the necessary repository permissions. +2. Verify the command syntax. +3. Look for any response from CodeRabbit in the PR comments. +4. Use `@coderabbitai help` for command guidance. + +Need help? Join our community on [Discord](https://discord.gg/coderabbit) or [contact our support team](/getting-started/support). diff --git a/docs/guides/commands.md b/docs/guides/commands.md index f7cbe002..43e6283a 100644 --- a/docs/guides/commands.md +++ b/docs/guides/commands.md @@ -3,92 +3,152 @@ title: Control and manage code reviews description: Learn how to control CodeRabbit using commands in pull request comments --- -# CodeRabbit Commands +This page is about issuing direct commands to CodeRabbit during code reviews. +For a general overview of performing code reviews with CodeRabbit, see [Review pull requests](/guides/code-review-overview). -> Control your code reviews directly from pull request comments using CodeRabbit's command system. Each command starts with `@coderabbitai` followed by the specific action you want to take. +You can control CodeRabbit's behavior with a specific pull request by mentioning the +username of its bot, `@coderabbitai`, alongside keywords in comments or the pull +request description, as specified by the next sections of this page. -## Review Control Commands +For a complete CodeRabbit command reference, see [Code review command reference](/reference/review-commands). -### Managing Reviews +## Control automatic code reviews {#flow} -| Command | Description | Use Case | -| --------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------- | -| `@coderabbitai review` | Triggers an incremental review of new changes | When automatic reviews are disabled or you want to manually trigger a review | -| `@coderabbitai full review` | Performs a complete review of all files from scratch | When you want to get fresh insights on the entire PR | -| `@coderabbitai summary` | Regenerates the PR summary | When you want an updated overview after making changes | +By default, CodeRabbit automatically reviews every new pull request created in +your repository. It updates its review with comments whenever the pull request has new commits +pushed to it. -### Review Flow Control +The following sections show you how to tell CodeRabbit to modify this behavior with +a specific pull request, such as pausing reviews, or resolving open comments. -| Command | Description | Use Case | -| ---------------------- | ---------------------------------------- | --------------------------------------------------- | -| `@coderabbitai pause` | Temporarily stops reviews on the PR | When you're making multiple rapid changes | -| `@coderabbitai resume` | Restarts reviews after a pause | When you're ready for CodeRabbit to review again | -| `@coderabbitai ignore` | Permanently disables reviews for this PR | When you want to handle the review process manually | +For more information about permanently configuring the behavior of CodeRabbit on +your repository, see [Add a configuration file](/getting-started/configure-coderabbit). -### Comment Management +### Pause and resume automatic code reviews {#pause-resume} -| Command | Description | Use Case | -| ----------------------- | --------------------------------------- | ------------------------------------------------------- | -| `@coderabbitai resolve` | Resolves all CodeRabbit review comments | When you've addressed all feedback and want to clean up | +You can tell CodeRabbit to pause its automatic reviews of a pull request. If +you do, then you can still manually request CodeRabbit to review changes using +the commands listed on [Code review command reference](/reference/review-commands). -### Documentation Commands +To pause automated reviews of a pull request, post the following comment to the +pull request: -| Command | Description | Use Case | -| ----------------------------------- | -------------------------------------------- | --------------------------------------------------- | -| `@coderabbitai generate docstrings` | Generates docstrings for functions in the PR | When you need automatic documentation for your code | -| `@coderabbitai configuration` | Shows current CodeRabbit settings | When you need to check or export your configuration | +```text +@coderabbitai pause +``` -### Agentic Chat Commands +To resume automated reviews after pausing them, post the following comment to the +pull request: -| Command | Description | Use Case | -| -------------------- | ---------------------------------------------------------- | ---------------------------------------------------- | -| `@coderabbitai plan` | Get the agentic chat to plan an edit for previous comments | When you want CodeRabbit to change your code for you | +```text +@coderabbitai resume +``` -### Help & Support +### Disable automatic code reviews {#ignore} -| Command | Description | Use Case | -| -------------------- | ------------------------------------------ | ------------------------------------------ | -| `@coderabbitai help` | Displays available commands and usage info | When you need guidance on using CodeRabbit | +To disable automatic code reviews for a pull request, add the following line +anywhere in the pull request description: -## Best Practices +```text +@coderabbitai ignore +``` -### Review Workflow +As long as that text remains in the description, CodeRabbit will not +automatically review any commits associated with that pull request. +You can still [chat with CodeRabbit](/guides/agent_chat) and issue other commands in the pull +request comments. -- Start with `@coderabbitai review` for checking new changes -- Use `@coderabbitai full review` when major changes require a fresh perspective -- Generate summaries after significant updates using `@coderabbitai summary` +To enable automatic reviews on that pull request, delete "`@coderabbitai ignore`" +from the pull request description. CodeRabbit commences automatic reviews starting with +the next commit made to the branch under review. -### Managing Large Changes +## Manually request code reviews {#request} -- Use `@coderabbitai pause` before making multiple commits -- Resume reviews with `@coderabbitai resume` when ready -- Consider `@coderabbitai full review` after substantial changes +You can ask CodeRabbit to perform a code review at any time. This can be useful +when you have paused automated code reviews. Manually requested reviews have +two types: -### Documentation Flow +- A _full review_ disregards any comments that CodeRabbit has already made + on this pull request, and generates a complete review of the entire pull request. -- Run `@coderabbitai generate docstrings` after finalizing function implementations -- Learn more about [docstring generation](/finishing-touches/docstrings) +- An _incremental review_ takes all comments that CodeRabbit has made since its most recent full review into consideration, and generates a review of only the new changes. -## Tips +To manually request a full review, post the following comment to the +pull request: -- Commands are case-insensitive (`@coderabbitai REVIEW` works the same as `@coderabbitai review`) -- Commands can be issued by anyone with write access to the repository -- Multiple commands can be used in sequence as needed -- Use `@coderabbitai configuration` to export your settings before making changes +```text +@coderabbitai full review +``` -## Command Response Time +To manually request an incremental review, post the following comment to the +pull request: -- Most commands (pause, resume, ignore) take effect immediately -- Review commands typically complete within a few minutes, depending on PR size -- Docstring generation time varies based on the number of functions +```text +@coderabbitai review +``` -## Troubleshooting +## Resolve comments {#resolve} -If a command doesn't seem to work: +To have CodeRabbit mark all of its previous comments as resolved, post the following comment to the +pull request: -1. Check that you have the necessary repository permissions -2. Verify the command syntax -3. Look for any response from CodeRabbit in the PR comments -4. Use `@coderabbitai help` for command guidance +```text +@coderabbitai resolve +``` -Need help? Join our community on [Discord](https://discord.gg/coderabbit) or contact our support team. +## Update information about the pull request {#update} + +The commands in this section request CodeRabbit to generate and post updated information +about the pull request itself. + +### Update the summary text {#summary} + +To have CodeRabbit update the generated summary of the branchโ€™s proposed changes +to the pull requestโ€™s description, post the following comment: + +```text +@coderabbitai summary +``` + +CodeRabbit updates the summary text to the description under the heading +"Summary by CodeRabbit". + +### Diagram the pull request history {#diagram} + +To have CodeRabbit post a comment that contains a sequence diagram which visualizes the +history of the pull request under review, post the following comment: + +```text +@coderabbitai generate sequence diagram +``` + +## Get information about CodeRabbit {#info} + +The commands in this section request CodeRabbit to display its own configuration +or documentation. + +### Display current configuration {#config} + +To have CodeRabbit post a comment listing out its current configuration +with your repository, post the following comment to the +pull request: + +```text +@coderabbitai configuration +``` + +### Display a quick-reference guide {#help} + +To have CodeRabbit post a comment to the pull request with a quick-reference +guide to its own commands and other features, post the following comment to the +pull request: + +```text +@coderabbitai help +``` + +## What's next {#whats-next} + +- [Generate code improvements](/guides/generate-improvements) +- [Best practices](/guides/code-review-best-practices) +- [Troubleshooting](/guides/code-review-troubleshooting) diff --git a/docs/guides/config-vscode.md b/docs/guides/config-vscode.md new file mode 100644 index 00000000..7a1fb8bd --- /dev/null +++ b/docs/guides/config-vscode.md @@ -0,0 +1,61 @@ +--- +title: Configure the VSCode extension +description: How to configure the CodeRabbit VSCode extension +--- + +This page is about configuring the CodeRabbit VSCode extension. For more information about the extension, see +[Review local changes](/code-editors). + +:::note +The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation. +::: + +## Find the settings screen {#find} + +To navigate to the settings screen for the CodeRabbit VSCode extension, follow these steps: + +1. In the activity bar, click the Extensions icon. + +1. In the sidebar, under **Installed**, click the gear-shaped **Manage** icon in the CodeRabbit row. + +1. In the menu that appears, select **Settings**. + +The settings screen contains the following configuration controls. + +## Configure AI agent integration {#agent} + +The **Agent Type** setting lets you choose the extension's response to using the **Fix with AI** feature during code reviews. Your options are the following: + +- **Native**: The extension prompts the AI agent associated with your IDE to apply the suggested fix. + + This works only with VSCode, using Copilot. If you have this option selected when using a different IDE, then the extension instead copies the prompt to your clipboard. + +- **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. + +- **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). + +## Configure automatic review behavior {#auto-reviews} + +The **Auto Review Mode** setting lets you control the behavior of the automatic code reviews that the extension can perform after you make commits to your local Git repository. Your options are the following: + +- **Disabled**: The extension doesn't perform automatic code reviews. + +- **Prompt**: After every commit, the extension displays a dialog asking if you'd like it to perform a code review. + +- **Auto**: The extension always performs a review after every commit. + +For more information about this feature, see [Automatically review local commits](/guides/use-vscode#auto-reviews). + +## Set a review timeout {#timeout} + +The **Review Timeout** setting lets you specify how long the extension waits for a response from CodeRabbit remote servers before timing out a code review. The default value is `20`. + +To turn off timeouts, set this value to `0`. + +## What's next {#whats-next} + +- [Use the VSCode extension](/guides/use-vscode) + +- [Uninstall the VSCode extension](/guides/uninstall-vscode) diff --git a/docs/guides/custom-reports.md b/docs/guides/custom-reports.md index c006207a..dbc04280 100644 --- a/docs/guides/custom-reports.md +++ b/docs/guides/custom-reports.md @@ -76,6 +76,11 @@ Contained within the `` tag. - `State`: string ("open"/"closed") - Current state of the PR - `Mergeable`: boolean (true/false) - Whether the PR can be merged - `Is stale`: boolean - Whether PR has been inactive for over 168 hours +- `PR Stage`: string - The current stage of open PRs in Open or Draft state, can be one of: + - "Needs Author Action" - PR requires author attention due to merge conflicts, draft status, or requested changes + - "Waiting for Author to Merge" - PR has approvals and is ready for author to merge + - "Waiting for Code Reviews" - PR is waiting for reviewers to approve + - undefined - PR is not in an open state (is merged or closed) #### Basic Information @@ -124,60 +129,65 @@ Generate a summary of each pull request in the following bullet point format: - If 'Merged: true' set 'PR State: ๐Ÿ”€ Merged' - Else If 'Draft: true' set 'PR State: ๐Ÿ“ Draft' - Else If 'State: open' or 'State: active' set 'PR State: ๐Ÿ’ฌ Open' - - Else If 'State: closed' and 'Merged: false' set 'PR State: ๐Ÿ”’ Closed' + - Else If 'State: closed' or 'State: DECLINED' and 'Merged: false' set 'PR State: ๐Ÿ”’ Closed' - Else set 'PR State: โ“ Unknown' - If the PR is stale, add 'โš ๏ธ Stale' at the end of the PR State. -- Mergeable (if PR State if not 'Merged'): Provide the mergeable status of the PR as 'Mergeable' or 'Not Mergeable'. +- Mergeable (if PR State is not 'Merged'): Provide the mergeable status of the PR as 'Mergeable' or 'Not Mergeable' based on the "Mergeable: " value. +- PR Stage (if PR State is not 'Merged'): Provide the stage of the PR based on the "PR Stage: " value. - Summary: In under 50 words provide a short summary of the PR. - Comments: In under 50 words provide a short summary of all comments found within , including each comments author username from . If there are no comments available, output 'No comments'. - **PR Link:** [#3001](https://github.com/mygithuborg/myrepo/pull/3001) -- **Title:** [PR Title] +- **Title:** PR Title - **PR State:** ๐Ÿ’ฌ Open - **Mergeable:** Mergeable -- **Summary:** [Summary of the PR]. -- **Comments:** [Summary of the PR comments]. +- **PR Stage:** Waiting for Code Reviews +- **Summary:** Summary of the PR. +- **Comments:** Summary of the PR comments or No comments. - **PR Link:** [#302](https://github.com/mygithuborg/thatrepo/pull/302) -- **Title:** [PR Title] +- **Title:** PR Title - **PR State:** ๐Ÿ’ฌ Open - **Mergeable:** Mergeable -- **Summary:** [Summary of the PR]. -- **Comments:** [Summary of the PR comments]. +- **PR Stage:** Waiting for Author to Merge +- **Summary:** Summary of the PR. +- **Comments:** Summary of the PR comments or No comments. - **PR Link:** [#3](https://github.com/mygithuborg/myotherrepo/pull/3) -- **Title:** [PR Title] +- **Title:** PR Title - **PR State:** ๐Ÿ”€ Merged -- **Summary:** [Summary of the PR]. -- **Comments:** [Summary of the PR comments]. +- **Summary:** Summary of the PR. +- **Comments:** Summary of the PR comments or No comments. - **PR Link:** [#14](https://github.com/mygithuborg/frontend/pull/14) -- **Title:** [PR Title] +- **Title:** PR Title - **PR State:** ๐Ÿ’ฌ Open - **Mergeable:** Mergeable -- **Summary:** [Summary of the PR]. -- **Comments:** [Summary of the PR comments]. +- **PR Stage:** Needs Author Action +- **Summary:** Summary of the PR. +- **Comments:** Summary of the PR comments or No comments. - **PR Link:** [#13005](https://github.com/mygithuborg/backend/pull/13005) -- **Title:** [PR Title] +- **Title:** PR Title - **PR State:** ๐Ÿ”€ Merged -- **Summary:** [Summary of the PR]. -- **Comments:** [Summary of the PR comments]. +- **Summary:** Summary of the PR. +- **Comments:** Summary of the PR comments or No comments. - **PR Link:** [#3006](https://github.com/mygithuborg/myrepo/pull/3006) -- **Title:** [PR Title] +- **Title:** PR Title - **PR State:** ๐Ÿ”€ Merged -- **Summary:** [Summary of the PR]. -- **Comments:** [Summary of the PR comments]. +- **Summary:** Summary of the PR. +- **Comments:** Summary of the PR comments or No comments. - **PR Link:** [#3007](https://github.com/mygithuborg/myrepo/pull/3007) -- **Title:** [PR Title] +- **Title:** PR Title - **PR State:** ๐Ÿ“ Draft - **Mergeable:** Not Mergeable -- **Summary:** [Summary of the PR]. -- **Comments:** [Summary of the PR comments]. +- **PR Stage:** Needs Author Action +- **Summary:** Summary of the PR. +- **Comments:** Summary of the PR comments or No comments. ``` diff --git a/docs/guides/generate-improvements.md b/docs/guides/generate-improvements.md new file mode 100644 index 00000000..d194a7dd --- /dev/null +++ b/docs/guides/generate-improvements.md @@ -0,0 +1,102 @@ +--- +title: Generate improvements +description: Request coderabbit to generate its own code improvements during code reviews +--- + +```mdx-code-block +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; + + +``` + +This page is about using CodeRabbit to generate improvements to code under review. + +For a general overview of performing code reviews with CodeRabbit, see [Review pull requests](/guides/code-review-overview). + +## Overview of CodeRabbit code generation {#overview} + +:::note +This feature is available only on GitHub. +::: + +You can request CodeRabbit to generate improvements to a branch that it is currently reviewing. + +To do this, write out your request prompt in a comment addressed to `@coderabbitai`, +such as with the following examples: + +- `@coderabbitai Please implement the changes you suggested in your code review.` +- `@coderabbitai Add input validation with proper error messages to these new functions.` +- `@coderabbitai Break this large function into smaller, more focused methods.` + +In addition to this kind of free-form request, you can also give CodeRabbit keyword-based +commands for common code-generation requests, as described in [Code generation commands](#commands). +This includes the `plan` keyword, which acts as shorthand for the first prompt on the +previous list. + +After you give it a code-generation prompt or command, CodeRabbit delivers its suggested improvements by taking these steps: + +1. CodeRabbit posts a comment or two to the pull request, detailing its improvement plans. +1. CodeRabbit publishes a new branch, based on the open pull request's branch, to the remote repository. +1. CodeRabbit opens a new pull request based on this new branch, and links to it from the original pull request. + +CodeRabbit doesn't make any further changes to the new branch or to the new pull request +after it creates them. From that point on, it's fully up to you what to do with the new, suggested-change branch. + +The best practice is to effectively take ownership of the new branch for yourself, +deciding whether it's worth merging into the original pull request branch, and making +any further updates you'd like to make first. You can use comments in the new branch +to ask CodeRabbit to explain its changes, if needed, or to otherwise converse with +CodeRabbit about the suggested improvements. + +Because it's just an ordinary Git branch, the presence of the suggested-change branch +doesn't block the ongoing code review in the original pull request branch. You are +free to merge, defer, or close the suggested-change pull request that CodeRabbit made, using any method or timing that fits +your workflow. + +## Code generation commands {#commands} + +This section lists short commands that you can give CodeRabbit to have it accomplish +common code-generation tasks. For more complex tasks, you can instead write out full +prompts, as described in the previous section. + +For a complete CodeRabbit command reference, see [Code review command reference](/reference/review-commands). + +### Generate inline documentation {#docstrings} + +To have CodeRabbit generate missing documentation for function code added by +the pull request, post the following comment to the +pull request: + +```text +@coderabbitai generate docstrings +``` + +For more information about how CodeRabbit can generate inline documentation, including +the Git platforms and programming languages that this feature supports, see +[Docstrings](/finishing-touches/docstrings). + +### Generate solutions to open review comments {#plan} + +To have CodeRabbit generate and add a new repository branch with code improvements +that try to address its own code review comments, post the following comment to the +pull request: + +```text +@coderabbitai plan +``` + +Using this keyword is essentially shorthand for writing out a prompt like the following: + +```text +@coderabbitai Implement the changes that you suggested and apply them to this pull request. +``` + +If you want to give CodeRabbit more specific implement instructions other than a general +request to implement its own suggestions, then you can write out those instructions +as a full prompt, instead of using the one-word `plan` command. + +## What's next {#whats-next} + +- [Control and manage code reviews](/guides/commands) +- [Best practices](/guides/code-review-best-practices) +- [Troubleshooting](/guides/code-review-troubleshooting) diff --git a/docs/guides/install-vscode.md b/docs/guides/install-vscode.md new file mode 100644 index 00000000..ec71e213 --- /dev/null +++ b/docs/guides/install-vscode.md @@ -0,0 +1,55 @@ +--- +title: Install the VSCode extension +description: How to install the CodeRabbit VSCode extension +--- + +This page is about installing the CodeRabbit VSCode extension. For more information about the extension, see +[Review local changes](/code-editors). + +:::note +The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation. +::: + +## Before you begin + +Before you can use the CodeRabbit VSCode extension, you need a CodeRabbit account. + +If you don't already have an account, you can create one by visiting [the CodeRabbit login page](https://app.coderabbit.ai/login). + +## Install the extension + +To install the CodeRabbit extension, follow these steps: + +1. In the editor activity bar, click **Extensions**. + +1. In sidebar, type `coderabbit` into the **Search Extensions in Marketplace** search bar. After a moment, **CodeRabbit** appears in the sidebar as a search result. + +1. Select **CodeRabbit**. A summary of the CodeRabbit VSCode extension appears in the window's main pane, along with installation controls. + +1. If you would like your editor to automatically check for and apply future updates to the extension, then keep the **Auto Update** checkbox selected. Otherwise, clear the checkbox. + +1. Click **Install**. + +1. A **Log in to CodeRabbit to get started** dialog appears. Click **Login**. If the dialog gets dismissed or times out first, then you can follow these alternate steps: + + 1. Click the CodeRabbit icon in the VSCode activity bar. + + 1. Click the **Use CodeRabbit for Free** button. + +1. Grant VSCode permission to open your browser, if asked. + +1. In your web browser, log into your CodeRabbit account. + +This connects your CodeRabbit account with the CodeRabbit VSCode extension. + +## Install using the marketplace website + +If you are using the VSCode IDE, and not an IDE that derives from it such as Cursor or Windsurf, then you can alternatively obtain and install the CodeRabbit VSCode extension by visiting [the extension's page on the Visual Studio Marketplace](https://coderabbit.link/vscode-docs). + +If you do install the extension this way, then you still need to connect your CodeRabbit account to the extension after installing it, as described in the previous section. + +## What's next + +- [Use the VSCode extension](/guides/use-vscode) + +- [Configure the VSCode extension](/guides/config-vscode) diff --git a/docs/guides/linked-issues.md b/docs/guides/linked-issues.md index b8768c3d..b802cb3b 100644 --- a/docs/guides/linked-issues.md +++ b/docs/guides/linked-issues.md @@ -168,6 +168,6 @@ Only the issue title and description are considered in the assessment. Comments ## Related Resources -- [Review Instructions](./review-instructions.md) +- [Add review instructions](/guides/review-instructions) - [Issue Chat](./issue-chat.md) - [Issue Creation](./issue-creation.md) diff --git a/docs/guides/review-instructions.md b/docs/guides/review-instructions.md index d756e938..c44b862c 100644 --- a/docs/guides/review-instructions.md +++ b/docs/guides/review-instructions.md @@ -1,11 +1,9 @@ --- -title: Review Instructions -sidebar_label: Review Instructions +title: Add review instructions description: CodeRabbit offers various customization options to tailor the reviews to your specific requirements. Customizations can be made using one of the below options. -sidebar_position: 2 --- The guide explains how to add custom review instructions for the entire project. diff --git a/docs/guides/uninstall-vscode.md b/docs/guides/uninstall-vscode.md new file mode 100644 index 00000000..27266d47 --- /dev/null +++ b/docs/guides/uninstall-vscode.md @@ -0,0 +1,25 @@ +--- +title: Uninstall the VSCode extension +description: How to uninstall the CodeRabbit VSCode extension +--- + +This page is about uninstalling the CodeRabbit VSCode extension. For more information about the extension, see +[Review local changes](/code-editors). + +:::note +The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation. +::: + +## Uninstall the extension + +To uninstall the VSCode extension, follow these steps: + +1. In the VSCode activity bar, click the CodeRabbit icon. + +1. In the CodeRabbit sidebar, click the door-shaped **Logout** icon. + +1. In the VSCode activity bar, click the **Extensions** icon. + +1. In the Extensions sidebar, click the gear-shaped **Manage** icon next to CodeRabbit in the list of installed extensions. + +1. Select **Uninstall**. diff --git a/docs/guides/use-vscode.md b/docs/guides/use-vscode.md new file mode 100644 index 00000000..bfacd87b --- /dev/null +++ b/docs/guides/use-vscode.md @@ -0,0 +1,109 @@ +--- +title: Use the VSCode extension +description: How to review your code with the VSCode extension. +--- + +This page is about performing local code reviews using the CodeRabbit VSCode extension. For more information about the extension, see +[Review local changes](/code-editors). To learn how to install the extension, see [Install the VSCode extension](/guides/install-vscode). + +The CodeRabbit VSCode extension works by comparing changes in your current, checked-out Git branch against another branch in your local repository. You can use the extension to automatically perform full-branch changes after every commit, or make different kinds of comparisons by manually requesting a review. + +:::note +The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation. +::: + +## Automatically review local commits {#auto-reviews} + +You can let CodeRabbit automatically review commits that you make to your local Git repository. These automatic reviews compare all committed changes against the branch that your working branch is based on. + +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. Click **Yes**. The CodeRabbit sidebar appears in your VSCode window. + +1. Wait for the review to complete. This might take a few minutes. To cancel a review in progress, click **Stop the review**. + +After the review completes, you can browse and respond to review comments as described in [Work with code reviews](#work). + +You can optionally configure the extension to either always or never perform automatic code reviews on commit, instead of displaying this yes-or-no dialog. For more information, see [Configure automatic review behavior](/guides/config-vscode#auto-reviews). + +For more control of code reviews performed using the CodeRabbit VSCode extension, you can manually request a review, as detailed in the following section. + +## Manually request code reviews {#manual-reviews} + +To manually review changes in a local Git branch using the CodeRabbit VSCode extension, follow these steps: + +1. Click the CodeRabbit icon in the VSCode activity bar. The CodeRabbit sidebar appears. + +1. If you want to compare your code changes to a branch other than its base branch, then follow these steps: + + 1. In the sidebar, under **Branch**, click the name of the base branch. A **Select a base branch** dialog appears, listing other branches in your local Git repository. + + 1. Select the name of a base branch to compare against. + +1. Select one of the review-action options from the menu at the bottom of the CodeRabbit sidebar: + + - To review all changes between the base branch and your current branch, including both committed and uncommitted changes, select **Review all changes**. This is the default selection. + + - To limit the review to only changes on your branch that you have committed, select **Review committed changes**. This includes commits that you have pushed to your remote repository, if any, as well as any local commits. + + - To limit the review to only uncommitted changes on your branch, select **Review uncommitted changes**. This includes both staged and unstaged changes. + +1. Refer to the list of **Files to review** in the sidebar. This list represents all of the files that the selected review action includes. To change this list of files, repeat the previous step to choose a different review action, or use Git features like `git stash` to selectively remove changes. + +1. To perform the review, click the button part of the menu. The CodeRabbit sidebar displays a **Review** section with the review's progress. + +1. Wait for the review to complete. This might take a few minutes. To cancel a review in progress, click **Stop the review**. + +After the review completes, you can browse and respond to review comments as described in the following section. + +## Work with code reviews {#work} + +The CodeRabbit VSCode extension presents code reviews as a series of actionable comments, connected to specific files and lines. It gives you tools to apply its suggestions quickly, when possible. + +### Browse comments {#browse} + +After the extension finishes its review, it adds any comments to the CodeRabbit sidebar under the **Files** heading in the **Reviews** section. + +Each item in **Files** is a comment referring to one or more lines in that file. Click the comment to see a detailed, inline comment in the editor, attached to the appropriate file and lines. + +You can react to these comments however you want: you can apply their advice literally, or let them guide you to find alternate solutions, or ignore them entirely. CodeRabbit comments are metadata stored with VSCode, and are not part of your files. The presence of comments doesn't block your use of version control. + +### Apply suggested changes {#apply} + +Whenever possible, the CodeRabbit VSCode extension attaches discrete change suggestion to comments in the form of code diffs. For example, if it detects a typo in a new function name, the extension might attach a diff with a suggested correction. + +If you agree with CodeRabbit about the suggested fix and want to apply to exactly as it proposes, click the checkmark-shaped **Apply suggested change** icon in the inline comment. The extension makes the change for you in the editor. + +### Request help from your AI coding agent {#agent} + +If CodeRabbit determines that an AI coding agent could help with resolving one of its comments, then it adds a star-shaped **Fix with AI** icon to the inline display of that comment. To have the extension generate a request for an AI agent to address the comment, click this icon. + +Depending upon your IDE and the current extension settings, the extension performs one of the following actions: + +- If you are using VSCode with Copilot installed, then the extension can send the request directly to Copilot. +- If you have Claude Code installed, then the extension can send the request to the `claude` command-line program. +- As a fallback, the extension can copy the request, phrased as an AI prompt, to your clipboard. You can then manually paste this prompt into the coding AI of your IDE. + +For more information about configuring this behavior, see [Configure AI agent integration](/guides/config-vscode#agent). + +### Ignore or collapse comments {#ignore} + +To remove a comment from the editor, click its **Ignore** icon. + +To remove a comment but keep an icon in the editor noting its presence, click its **Collapse** icon. + +To see an ignored or collapsed comment in the editor again, click its summary in the CodeRabbit sidebar. + +### Browse previous reviews {#previous} + +If you have performed reviews prior to the most recent review in the current VSCode window, then you can browse the comments from these reviews under the **Previous reviews** heading in the CodeRabbit sidebar. + +If a past review comment no longer applies to the current state of your code, then clicking that comment won't display a detailed comment or suggestion in the editor. + +## What's next {#whats-next} + +- [Configure the VSCode extension](/guides/config-vscode) + +- [Uninstall the VSCode extension](/guides/uninstall-vscode) diff --git a/docs/overview/introduction.md b/docs/overview/introduction.md index e215f574..f937ac67 100644 --- a/docs/overview/introduction.md +++ b/docs/overview/introduction.md @@ -58,8 +58,8 @@ No matter how you tune and customize CodeRabbit, its default settings make it us CodeRabbit integrates in just a few clicks with many popular Git platforms: -- GitHub, including GitHub Enterprise Server -- GitLab, including self-managed GitLab +- GitHub, GitHub Enterprise Cloud, GitHub Enterprise Server, +- GitLab, GitLab Self-Managed - Azure DevOps - Bitbucket Cloud @@ -81,7 +81,6 @@ For more information, see [Issue Creation](/guides/issue-creation) and [Issue Ch CodeRabbit collects only the minimum amount of information needed to provide you with our code review services. Our privacy and security posture centers around protecting your data through ephemerality: - All queries to large language models (LLMs) exist in-memory only, with zero retention after each query completes. -- We don't store a copy of your code. - We don't use your code, code reviews, or other collected data to train LLMs. - CodeRabbit doesn't share any collected customer data with third parties. - We keep all customer data confidential, and isolated by organization. @@ -95,8 +94,16 @@ Public repositories can use the Pro tier of CodeRabbit at no charge, including a For private repositories, a number of pricing tiers are available. These range from a Free tier that offers unlimited code-change summaries, to an Enterprise tier with access to advanced features and SLA support. For more information, see [Pricing](https://www.coderabbit.ai/pricing). +## Review local changes from within VSCode + +As a separate, free product, CodeRabbit offers a VSCode extension that brings a subset of core CodeRabbit features to VSCode. This lets you use the power of CodeRabbit to tune and tidy your code changes locally before pushing your changes into a formal pull request for more thorough reviews. + +For more information, see [Review local changes](/code-editors). + ## What's next - [Quickstart](/getting-started/quickstart/) lets you experience your first CodeRabbit code review first-hand. +- [Review local changes](/code-editors) guides you through installing and using a subset of CodeRabbit features directly from your code editor. + - [Why CodeRabbit?](/overview/why-coderabbit) dives further into the philosophies and technologies that drive CodeRabbit. diff --git a/docs/platforms/github-com.md b/docs/platforms/github-com.md index 4866fd00..ecc07272 100644 --- a/docs/platforms/github-com.md +++ b/docs/platforms/github-com.md @@ -109,7 +109,7 @@ CodeRabbit generates detailed statistics and test plans for each pull request. ![Test Plan by CodeRabbit](/img/integrations/test-plan.png) -> CodeRabbit also allows you to configure **custom review instructions** based on your organization's needs, in case you want it to follow specific guidelines beyond the standard review, to learn more on [adding custom review instructions](https://docs.coderabbit.ai/guides/review-instructions/) +> CodeRabbit also allows you to configure **custom review instructions** based on your organization's needs, in case you want it to follow specific guidelines beyond the standard review, to learn more on [adding custom review instructions](/guides/review-instructions) Whether you manage a popular repository or are working on a smaller project, whether it's hosted on **GitLab, GitHub, or self-hosted GitHub or GitLab**, CodeRabbit can help streamline your development process. This AI Code Review assistant is designed to save you time by automating code reviews and offering insightful feedback. diff --git a/docs/reference/caching.md b/docs/reference/caching.md new file mode 100644 index 00000000..cea907c0 --- /dev/null +++ b/docs/reference/caching.md @@ -0,0 +1,20 @@ +# Caching + +CodeRabbit provides caching capabilities for code and dependencies to accelerate the review process. This feature enhances your development workflow by delivering faster feedback. + +## Security and Privacy + +- Cached data is encrypted (except for OSS projects) +- Cache expires after a maximum of one week +- Cached data is used exclusively for speeding up reviews + +## Configuration + +You can opt out of caching in two ways: + +1. **Disable Cache**: Configure `Review - Disable Cache` at either: + + - Organization level + - Repository level + +2. **Disable Data Retention**: Turn off the `Data Retention` setting in your Organization Settings to disable all data retention across your organization. diff --git a/docs/reference/review-commands.md b/docs/reference/review-commands.md new file mode 100644 index 00000000..011bf9d5 --- /dev/null +++ b/docs/reference/review-commands.md @@ -0,0 +1,47 @@ +--- +title: Code review commands +description: A list of commands that you can issue to CodeRabbit during code reviews. +--- + +This page lists the various commands that you can issue to CodeRabbit through +its chat interface during code reviews. For more information about working with +CodeRabbit through chat, see [Interact with CodeRabbit reviews](/guides/code-review-overview#interact). + +| Command | Description | Use Case | +| --------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------- | +| `@coderabbitai review` | Triggers an incremental review of new changes | When automatic reviews are disabled or you want to manually trigger a review | +| `@coderabbitai full review` | Performs a complete review of all files from scratch | When you want to get fresh insights on the entire PR | +| `@coderabbitai summary` | Regenerates the PR summary | When you want an updated overview after making changes | + +## Code review flow control + +| Command | Description | Use Case | +| ---------------------- | ---------------------------------------- | --------------------------------------------------- | +| `@coderabbitai pause` | Temporarily stops reviews on the PR | When you're making multiple rapid changes | +| `@coderabbitai resume` | Restarts reviews after a pause | When you're ready for CodeRabbit to review again | +| `@coderabbitai ignore` | Permanently disables reviews for this PR | When you want to handle the review process manually | + +## Comment management + +| Command | Description | Use Case | +| ----------------------- | --------------------------------------- | ------------------------------------------------------- | +| `@coderabbitai resolve` | Resolves all CodeRabbit review comments | When you've addressed all feedback and want to clean up | + +## Documentation commands + +| Command | Description | Use Case | +| ----------------------------------- | -------------------------------------------- | --------------------------------------------------- | +| `@coderabbitai generate docstrings` | Generates docstrings for functions in the PR | When you need automatic documentation for your code | +| `@coderabbitai configuration` | Shows current CodeRabbit settings | When you need to check or export your configuration | + +## Agentic chat commands + +| Command | Description | Use Case | +| -------------------- | ---------------------------------------------------------- | ---------------------------------------------------- | +| `@coderabbitai plan` | Get the agentic chat to plan an edit for previous comments | When you want CodeRabbit to change your code for you | + +## Help and support + +| Command | Description | Use Case | +| -------------------- | ------------------------------------------ | ------------------------------------------ | +| `@coderabbitai help` | Displays available commands and usage info | When you need guidance on using CodeRabbit | diff --git a/docs/tools/list.md b/docs/tools/list.md new file mode 100644 index 00000000..d85b4c78 --- /dev/null +++ b/docs/tools/list.md @@ -0,0 +1,76 @@ +--- +title: List of supported tools +description: Overview of CodeRabbit's supported linters and security analysis tools +--- + +This is a list of the third-party open-source linters and security analysis tools that CodeRabbit uses to generate code reviews. + +For more information about fine-tuning the CodeRabbit configuration of a tool, click that tool's name in the following list. + +For an overview of how CodeRabbit uses these tools when generating code reviews, as well as general information about controlling their use, see [Configure third-party tools](/tools/). + +| Technology | Tools | Category | +| :-------------------------- | :--------------------------------------------------------- | :-------------------------------------------------- | +| All | [Gitleaks][Gitleaks], [Pipeline Remediation][Pipeline] | Code Security, CI/CD | +| Azure DevOps Pipelines | [Pipeline Remediation][Pipeline] | CI/CD Failure Remediation | +| CircleCI | [CircleCI][CircleCI], [Pipeline Remediation][Pipeline] | Configuration Validation, CI/CD Failure Remediation | +| CloudFormation | [Checkov][Checkov] | Code Security | +| Cppcheck | [Cppcheck][Cppcheck] | Code Quality | +| CSS | [Biome][Biome] | Code Quality | +| Docker | [Hadolint][Hadolint], [Checkov][Checkov] | Code Quality, Code Security | +| GitHub Actions | [actionlint][actionlint], [Pipeline Remediation][Pipeline] | Code Quality, CI/CD Failure Remediation | +| GitLab Pipelines | [Pipeline Remediation][Pipeline] | CI/CD Failure Remediation | +| Go | [golangci-lint][golangci-lint] | Code Quality | +| Helm | [Checkov][Checkov] | Code Security | +| Javascript | [Biome][Biome], [oxlint][oxlint] | Code Quality | +| JSON, JSONC | [Biome][Biome] | Code Quality | +| JSX | [Biome][Biome], [oxlint][oxlint] | Code Quality | +| Kotlin | [detekt][detekt] | Code Quality | +| Kubernetes | [Checkov][Checkov] | Code Security | +| Lua | [Luacheck][Luacheck] | Code Quality | +| Markdown | [markdownlint][markdownlint], [LanguageTool][LanguageTool] | Code Quality, Grammar Checking | +| PHP | [PHPStan][PHPStan] | Code Quality | +| Plaintext | [LanguageTool][LanguageTool] | Grammar and Spell Checking | +| Java | [PMD][PMD] | Code Quality | +| Protobuf | [Buf][Buf] | Code Quality | +| Python | [Ruff][Ruff] | Code Quality | +| Regal | [Regal][Regal] | Code Quality | +| Ruby | [RuboCop][RuboCop] | Code Quality | +| Semgrep | [Semgrep][Semgrep] | Code Security | +| Shell (sh, bash, ksh, dash) | [ShellCheck][ShellCheck] | Code Quality | +| Shopify | [Shopify CLI][ShopifyCLI] | Code Quality | +| SQL | [SQLFluff][SQLFluff] | Code Quality | +| Swift | [SwiftLint][SwiftLint] | Code Quality | +| Terraform | [Checkov][Checkov] | Code Security | +| TSX | [Biome][Biome], [oxlint][oxlint] | Code Quality | +| Typescript | [Biome][Biome], [oxlint][oxlint] | Code Quality | +| YAML | [YAMLlint][YAMLlint] | Code Quality | +| Prisma | [Prisma Lint][PrismaLint] | Code Quality | + +[ShellCheck]: /tools/shellcheck.md +[SQLFluff]: /tools/sqlfluff.md +[Ruff]: /tools/ruff.md +[markdownlint]: /tools/markdownlint.md +[LanguageTool]: /tools/languagetool.md +[Biome]: /tools/biome.md +[Hadolint]: /tools/hadolint.md +[SwiftLint]: /tools/swiftlint.md +[PHPStan]: /tools/phpstan.md +[golangci-lint]: /tools/golangci-lint.md +[YAMLlint]: /tools/yamllint.md +[Gitleaks]: /tools/gitleaks.md +[Checkov]: /tools/checkov.md +[detekt]: /tools/detekt.md +[RuboCop]: /tools/rubocop.md +[Buf]: /tools/buf.md +[actionlint]: /tools/actionlint.md +[Regal]: /tools/regal.md +[PMD]: /tools/pmd.md +[Cppcheck]: /tools/cppcheck.md +[CircleCI]: /tools/circleci.md +[Semgrep]: /tools/semgrep.md +[Pipeline]: /tools/pipeline-remediation.md +[PrismaLint]: /tools/prisma-lint.md +[oxlint]: /tools/oxlint.md +[ShopifyCLI]: /tools/shopify-cli.md +[Luacheck]: /tools/luacheck.md diff --git a/docs/tools/luacheck.md b/docs/tools/luacheck.md new file mode 100644 index 00000000..3a8414b6 --- /dev/null +++ b/docs/tools/luacheck.md @@ -0,0 +1,49 @@ +--- +title: Luacheck +sidebar_label: Luacheck +description: CodeRabbit's guide to Luacheck. +--- + +```mdx-code-block +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; + + +``` + +[Luacheck](https://github.com/mpeterv/luacheck) is a static analyzer and linter for Lua code that detects various issues such as undefined global variables, unused variables and values, accessing uninitialized variables, unreachable code, and more. + +## Supported Files + +Luacheck will run on files with the following extensions: + +- `.lua` + +## Configuration + +Luacheck supports the following configuration files: + +- `.luacheckrc` +- `luacheckrc` +- `.luacheckrc.lua` +- `luacheckrc.lua` + +:::note + +Luacheck does not require configuration to run. If no configuration file is found, it will use default settings. + +::: + +## Features + +Luacheck can detect: + +- Usage of undefined global variables +- Unused variables and values +- Accessing uninitialized variables +- Unreachable code +- And many more issues + +## Links + +- [Luacheck GitHub Repository](https://github.com/mpeterv/luacheck) +- [Luacheck Documentation](https://luacheck.readthedocs.io/) diff --git a/docs/tools/oxlint.md b/docs/tools/oxlint.md index 8a93cbd2..fd5e7e2c 100644 --- a/docs/tools/oxlint.md +++ b/docs/tools/oxlint.md @@ -1,7 +1,7 @@ --- -title: oxlint -sidebar_label: oxlint -description: CodeRabbit's guide to oxlint. +title: Oxlint +sidebar_label: Oxlint +description: CodeRabbit's guide to Oxlint. --- ```mdx-code-block @@ -10,37 +10,41 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; ``` -[oxlint](https://github.com/oxc-project/oxc) is a blazingly fast JavaScript/TypeScript linter written in Rust that is 50-100x faster than ESLint. +[Oxlint](https://oxc.rs/docs/guide/usage/linter) is a blazingly fast JavaScript/TypeScript linter written in Rust that is 50-100x faster than ESLint. -## Files +## Supported Files -oxlint will run on files with the following extensions: +Oxlint will run on files with the following extensions: - `.js` +- `.mjs` +- `.cjs` - `.jsx` - `.ts` +- `.mts` +- `.cts` - `.tsx` +- `.vue` +- `.astro` +- `.svelte` ## Configuration -oxlint supports the following config files: +Oxlint supports the following configuration file: -- `oxlint.json` -- `.oxlintrc` - `.oxlintrc.json` -- `oxlint.config.json` :::note -oxlint does not require configuration to run. If no oxlint config file is found and Biome is enabled, CodeRabbit will use Biome instead as oxlint functionality is included within Biome. If Biome is not enabled or an oxlint config file is found, CodeRabbit will use the default oxlint config. +If no Oxlint config file is found and Biome is enabled, CodeRabbit will use Biome instead as Oxlint functionality is included within Biome. -::: +If Biome is not enabled or an Oxlint config file is found, CodeRabbit will use the `.oxlintrc.json` Oxlint config to run. -## Rule Configuration +Oxlint does not require configuration to run if Biome is disabled and Oxlint is enabled. -While oxlint embraces convention over configuration, you can customize rules in your config file if needed. The config file should be in JSON format. See the [oxlint documentation](https://oxc-project.github.io) for more details on available rules and configuration options. +::: ## Links -- [oxlint GitHub Repository](https://github.com/oxc-project/oxc) -- [oxlint Website](https://oxc.rust-server.org) +- [Oxlint GitHub Repository](https://github.com/oxc-project/oxc/releases/) +- [Oxlint Website](https://oxc.rs/docs/guide/usage/linter) diff --git a/docs/tools/pipeline-remediation.md b/docs/tools/pipeline-remediation.md index d03ad33d..2beb0213 100644 --- a/docs/tools/pipeline-remediation.md +++ b/docs/tools/pipeline-remediation.md @@ -94,7 +94,7 @@ With CodeRabbit CI/CD Pipeline Remediation, you have coderabbit automatically re ### GitLab CI/CD -- Pipeline failure analysis +- GitLab CI/CD Pipeline failure analysis - Integration with GitLab Advanced Security - Support for DAST (Dynamic Application Security Testing) findings - Remediation for SAST (Static Application Security Testing) issues @@ -105,16 +105,16 @@ With CodeRabbit CI/CD Pipeline Remediation, you have coderabbit automatically re ### CircleCI -- Workflow failure detection +- CircleCI Pipeline failure analysis - Job-level error analysis - Configuration validation - Dependency resolution CircleCI Integration -### Azure DevOps +### Azure DevOps Pipelines -- Pipeline failure detection +- Azure DevOps CI/CD Pipeline failure analysis - Integration with Azure DevOps Checks - Support for custom tasks and pipelines - Remediation for build issues @@ -174,4 +174,4 @@ Our tool handles a wide range of pipeline failures including: - [GitHub Actions Configuration](https://docs.github.com/en/actions) - [GitLab CI/CD Documentation](https://docs.gitlab.com/ee/ci/) - [CircleCI Documentation](https://circleci.com/docs/) -- [Azure DevOps Documentation](https://learn.microsoft.com/en-us/azure/devops/pipelines/get-started/pipelines-get-started?view=azure-devops) +- [Azure DevOps Pipeline Documentation](https://learn.microsoft.com/en-us/azure/devops/pipelines/get-started/pipelines-get-started?view=azure-devops) diff --git a/docs/tools/tools.md b/docs/tools/tools.md index 113c2fee..45b376c5 100644 --- a/docs/tools/tools.md +++ b/docs/tools/tools.md @@ -3,6 +3,8 @@ title: Configure third-party tool use description: Overview of CodeRabbit's supported linters and security analysis tools. --- +This page provides an overview of how CodeRabbit uses third-party open-source tools to deliver its multifaceted code reviews. For a complete list of supported tools, see [Supported tools](/tools/list). + ```mdx-code-block import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; @@ -40,68 +42,6 @@ Remove extraneous f prefix (F541) ``` -## Supported Tools - -| Technology | Tools | Category | -| :-------------------------- | :--------------------------------------------------------- | :-------------------------------------------------- | -| All | [Gitleaks][Gitleaks], [Pipeline Remediation][Pipeline] | Code Security, CI/CD | -| Azure DevOps Pipelines | [Pipeline Remediation][Pipeline] | CI/CD Failure Remediation | -| CircleCI | [CircleCI][CircleCI], [Pipeline Remediation][Pipeline] | Configuration Validation, CI/CD Failure Remediation | -| CloudFormation | [Checkov][Checkov] | Code Security | -| Cppcheck | [Cppcheck][Cppcheck] | Code Quality | -| CSS | [Biome][Biome] | Code Quality | -| Docker | [Hadolint][Hadolint], [Checkov][Checkov] | Code Quality, Code Security | -| GitHub Actions | [actionlint][actionlint], [Pipeline Remediation][Pipeline] | Code Quality, CI/CD Failure Remediation | -| GitLab Pipelines | [Pipeline Remediation][Pipeline] | CI/CD Failure Remediation | -| Go | [golangci-lint][golangci-lint] | Code Quality | -| Helm | [Checkov][Checkov] | Code Security | -| Javascript | [Biome][Biome], [oxlint][oxlint] | Code Quality | -| JSON, JSONC | [Biome][Biome] | Code Quality | -| JSX | [Biome][Biome], [oxlint][oxlint] | Code Quality | -| Kotlin | [detekt][detekt] | Code Quality | -| Kubernetes | [Checkov][Checkov] | Code Security | -| Markdown | [markdownlint][markdownlint], [LanguageTool][LanguageTool] | Code Quality, Grammar Checking | -| PHP | [PHPStan][PHPStan] | Code Quality | -| Plaintext | [LanguageTool][LanguageTool] | Grammar and Spell Checking | -| Java | [PMD][PMD] | Code Quality | -| Protobuf | [Buf][Buf] | Code Quality | -| Python | [Ruff][Ruff] | Code Quality | -| Regal | [Regal][Regal] | Code Quality | -| Ruby | [RuboCop][RuboCop] | Code Quality | -| Semgrep | [Semgrep][Semgrep] | Code Security | -| Shell (sh, bash, ksh, dash) | [ShellCheck][ShellCheck] | Code Quality | -| Shopify | [Shopify CLI][ShopifyCLI] | Code Quality | -| SQL | [SQLFluff][SQLFluff] | Code Quality | -| Swift | [SwiftLint][SwiftLint] | Code Quality | -| Terraform | [Checkov][Checkov] | Code Security | -| TSX | [Biome][Biome], [oxlint][oxlint] | Code Quality | -| Typescript | [Biome][Biome], [oxlint][oxlint] | Code Quality | -| YAML | [YAMLlint][YAMLlint] | Code Quality | -| Prisma | [Prisma Lint][PrismaLint] | Code Quality | - -[ShellCheck]: ./shellcheck.md -[SQLFluff]: ./sqlfluff.md -[Ruff]: ./ruff.md -[markdownlint]: ./markdownlint.md -[LanguageTool]: ./languagetool.md -[Biome]: ./biome.md -[Hadolint]: ./hadolint.md -[SwiftLint]: ./swiftlint.md -[PHPStan]: ./phpstan.md -[golangci-lint]: ./golangci-lint.md -[YAMLlint]: ./yamllint.md -[Gitleaks]: ./gitleaks.md -[Checkov]: ./checkov.md -[detekt]: ./detekt.md -[RuboCop]: ./rubocop.md -[Buf]: ./buf.md -[actionlint]: ./actionlint.md -[Regal]: ./regal.md -[PMD]: ./pmd.md -[Cppcheck]: ./cppcheck.md -[CircleCI]: ./circleci.md -[Semgrep]: ./semgrep.md -[Pipeline]: ./pipeline-remediation.md -[PrismaLint]: ./prisma-lint.md -[oxlint]: ./oxlint.md -[ShopifyCLI]: ./shopify-cli.md +## What's next + +- For a complete list of tools that CodeRabbit supports, see [Supported tools](/tools/list). diff --git a/sidebars.ts b/sidebars.ts index 8e701fc2..210e385d 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -30,13 +30,13 @@ const sidebars: SidebarsConfig = { docsSidebar: [ { type: "category", - collapsed: false, + collapsed: true, label: "Get started with CodeRabbit", items: ["overview/introduction", "getting-started/quickstart"], }, { type: "category", - collapsed: false, + collapsed: true, label: "Add CodeRabbit to your repository", items: [ "platforms/platforms", @@ -70,24 +70,29 @@ const sidebars: SidebarsConfig = { }, { type: "category", - collapsed: false, + collapsed: true, label: "Configure CodeRabbit", items: [ "getting-started/configure-coderabbit", "integrations/knowledge-base", + "guides/review-instructions", "tools/tools", ], }, { type: "category", - collapsed: false, + collapsed: true, label: "Review pull requests", items: [ + "guides/code-review-overview", "guides/commands", + "guides/generate-improvements", + "guides/code-review-best-practices", + "guides/code-review-troubleshooting", "guides/agent_chat", { type: "category", - collapsed: false, + collapsed: true, label: "Analyze and improve your code", items: [ "integrations/code-graph-analysis", @@ -98,7 +103,7 @@ const sidebars: SidebarsConfig = { }, { type: "category", - collapsed: false, + collapsed: true, label: "Create and resolve issues", items: [ "integrations/issue-integrations", @@ -109,7 +114,19 @@ const sidebars: SidebarsConfig = { }, { type: "category", - collapsed: false, + collapsed: true, + label: "Review local changes", + items: [ + "guides/about-vscode", + "guides/install-vscode", + "guides/use-vscode", + "guides/config-vscode", + "guides/uninstall-vscode", + ], + }, + { + type: "category", + collapsed: true, label: "Generate reports", items: [ "guides/ondemand-reports", @@ -119,7 +136,7 @@ const sidebars: SidebarsConfig = { }, { type: "category", - collapsed: false, + collapsed: true, label: "Reference", items: [ { @@ -127,11 +144,13 @@ const sidebars: SidebarsConfig = { label: "CodeRabbit API", href: "https://api.coderabbit.ai/api/swagger/", }, + "reference/review-commands", { type: "category", label: "Supported tools", collapsed: true, items: [ + "tools/list", "tools/actionlint", "tools/biome", "tools/buf", @@ -144,6 +163,7 @@ const sidebars: SidebarsConfig = { "tools/golangci-lint", "tools/hadolint", "tools/languagetool", + "tools/luacheck", "tools/markdownlint", "tools/oxlint", "tools/phpstan", @@ -160,11 +180,12 @@ const sidebars: SidebarsConfig = { "tools/yamllint", ], }, + "reference/caching", ], }, { type: "category", - collapsed: false, + collapsed: true, label: "Resources", items: [ "getting-started/support", diff --git a/static/schema/schema.v2.json b/static/schema/schema.v2.json index 1442d1f0..66ccd0a5 100644 --- a/static/schema/schema.v2.json +++ b/static/schema/schema.v2.json @@ -346,6 +346,19 @@ "additionalProperties": false, "default": {}, "description": "Docstrings | Options for generating Docstrings for your PRs/MRs." + }, + "unit_tests": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Unit Tests | Allow CodeRabbit to generate unit tests for PRs/MRs." + } + }, + "additionalProperties": false, + "default": {}, + "description": "Unit Tests | Options for generating unit tests for your PRs/MRs." } }, "additionalProperties": false, @@ -389,7 +402,7 @@ }, "additionalProperties": false, "default": {}, - "description": "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.31.1" + "description": "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" }, "shellcheck": { "type": "object", @@ -410,7 +423,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Ruff | Ruff is a Python linter and code formatter. | Enable Ruff integration. | v0.8.2" + "description": "Enable Ruff | Ruff is a Python linter and code formatter. | Enable Ruff integration. | v0.11.9" } }, "additionalProperties": false, @@ -440,7 +453,7 @@ }, "timeout_ms": { "type": "number", - "maximum": 300000, + "maximum": 900000, "minimum": 0, "default": 90000, "description": "Time in milliseconds to wait for all GitHub Checks to conclude." @@ -555,7 +568,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable PHPStan | PHPStan requires [config file](https://phpstan.org/config-reference#config-file) in your repository root. Please ensure that this file contains the `paths:` parameter. | v2.0.3" + "description": "Enable PHPStan | PHPStan requires [config file](https://phpstan.org/config-reference#config-file) in your repository root. Please ensure that this file contains the `paths:` parameter. | v2.1.15" }, "level": { "type": "string", @@ -604,7 +617,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable YAMLlint | YAMLlint is a linter for YAML files. | Enable YAMLlint integration. | v1.35.1" + "description": "Enable YAMLlint | YAMLlint is a linter for YAML files. | Enable YAMLlint integration. | v1.37.1" } }, "additionalProperties": false, @@ -617,7 +630,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Gitleaks | Gitleaks is a secret scanner. | Enable Gitleaks integration. | v8.21.2" + "description": "Enable Gitleaks | Gitleaks is a secret scanner. | Enable Gitleaks integration. | v8.26.0" } }, "additionalProperties": false, @@ -643,7 +656,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable detekt | detekt is a static code analysis tool for Kotlin files. | v1.23.7" + "description": "Enable detekt | detekt is a static code analysis tool for Kotlin files. | v1.23.8" }, "config_file": { "type": "string", @@ -673,7 +686,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable RuboCop | RuboCop is a Ruby static code analyzer (a.k.a. linter ) and code formatter. | v1.73" + "description": "Enable RuboCop | RuboCop is a Ruby static code analyzer (a.k.a. linter ) and code formatter. | v1.75.5" } }, "additionalProperties": false, @@ -686,7 +699,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Buf | Buf offers linting for Protobuf files. | v1.47.2" + "description": "Enable Buf | Buf offers linting for Protobuf files. | v1.54.0" } }, "additionalProperties": false, @@ -699,7 +712,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Regal | Regal is a linter and language server for Rego. | v0.29.2" + "description": "Enable Regal | Regal is a linter and language server for Rego. | v0.33.1" } }, "additionalProperties": false, @@ -712,7 +725,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable actionlint | is a static checker for GitHub Actions workflow files. | v1.7.4" + "description": "Enable actionlint | is a static checker for GitHub Actions workflow files. | v1.7.7" } }, "additionalProperties": false, @@ -725,7 +738,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable PMD | PMD is an extensible multilanguage static code analyzer. Itโ€™s mainly concerned with Java. | v7.8.0" + "description": "Enable PMD | PMD is an extensible multilanguage static code analyzer. Itโ€™s mainly concerned with Java. | v7.13.0" }, "config_file": { "type": "string", @@ -742,7 +755,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Cppcheck | Cppcheck is a static code analysis tool for the C and C++ programming languages. | v2.10-2" + "description": "Enable Cppcheck | Cppcheck is a static code analysis tool for the C and C++ programming languages. | v2.17.1" } }, "additionalProperties": false, @@ -755,7 +768,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Semgrep | Semgrep is a static analysis tool designed to scan code for security vulnerabilities and code quality issues. | Enable Semgrep integration. | v1.99.0" + "description": "Enable Semgrep | Semgrep is a static analysis tool designed to scan code for security vulnerabilities and code quality issues. | Enable Semgrep integration. | v1.122.0" }, "config_file": { "type": "string", @@ -772,7 +785,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable CircleCI | CircleCI tool is a static checker for CircleCI config files. | v0.1.31151" + "description": "Enable CircleCI | CircleCI tool is a static checker for CircleCI config files. | v0.1.31687" } }, "additionalProperties": false, @@ -785,7 +798,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable SQLFluff | SQLFluff is an open source, dialect-flexible and configurable SQL linter. | v3.3.0" + "description": "Enable SQLFluff | SQLFluff is an open source, dialect-flexible and configurable SQL linter. | v3.4.0" } }, "additionalProperties": false, @@ -798,7 +811,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Prisma Schema linting | Prisma Schema linting helps maintain consistent and error-free schema files | v0.10.0" + "description": "Enable Prisma Schema linting | Prisma Schema linting helps maintain consistent and error-free schema files | v0.10.1" } }, "additionalProperties": false, @@ -811,7 +824,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable OXC | OXC is a JavaScript/TypeScript linter written in Rust. | v0.16.5" + "description": "Enable OXC | OXC is a JavaScript/TypeScript linter written in Rust. | v0.16.10" } }, "additionalProperties": false, @@ -830,6 +843,19 @@ "additionalProperties": false, "default": {}, "description": "Configuration for Shopify Theme Check to ensure theme quality and best practices" + }, + "luacheck": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Enable Lua code linting | Luacheck helps maintain consistent and error-free Lua code | v1.2.0" + } + }, + "additionalProperties": false, + "default": {}, + "description": "Configuration for Lua code linting to ensure code quality" } }, "additionalProperties": false, @@ -892,7 +918,7 @@ "opt_out": { "type": "boolean", "default": false, - "description": "Opt out | Opt out of all knowledge base features that require data retention." + "description": "Opt Out | 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." }, "web_search": { "type": "object", @@ -1120,6 +1146,37 @@ "path_instructions": [] }, "description": "Settings related to the generation of docstrings." + }, + "unit_tests": { + "type": "object", + "properties": { + "path_instructions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "File path glob pattern. Example: **/*.js" + }, + "instructions": { + "type": "string", + "maxLength": 20000, + "description": "Provides additional guidelines for unit test generation based on file paths." + } + }, + "required": ["path", "instructions"], + "additionalProperties": false + }, + "default": [], + "description": "Unit Test Generation | Provide additional guidelines for unit test generation based on file paths." + } + }, + "additionalProperties": false, + "default": { + "path_instructions": [] + }, + "description": "Settings related to the generation of unit tests." } }, "additionalProperties": false,