diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dbd44b4a..5c7190be 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,3 @@ -*.ts @coderabbitai/typescript-reviewers +docusaurus.config.ts @coderabbitai/typescript-reviewers +src/**/*.ts @coderabbitai/typescript-reviewers +src/**/*.tsx @coderabbitai/react-reviewers diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..32cf3bf1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,13 @@ +--- +name: Bug report +about: Report a flaw, inaccuracy, or omission in our documentation. +title: "" +labels: bug, needs triage +assignees: jmacdotorg +--- + +**URL of the documentation page with this bug**: + +**A brief summary of the documentation bug**: + +(Optional) **Suggestions on how best we can address the bug**: diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 00000000..4dccde05 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Request documentation for a new or existing CodeRabbit feature. +title: "" +labels: enhancement, needs triage +assignees: jmacdotorg +--- + +**The name of this feature**: + +**Expected launch date**: + +**Personnel (PM, TL, etc.)**: + +**Summary of this feature**, including a high-level description of the public documentation that it requires: + +**Links to relevant internal documentation:** diff --git a/.github/ISSUE_TEMPLATE/other-documentation-request.md b/.github/ISSUE_TEMPLATE/other-documentation-request.md new file mode 100644 index 00000000..b258a89b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/other-documentation-request.md @@ -0,0 +1,7 @@ +--- +name: Other documentation request +about: Request a documentation improvement other than new-feature coverage. +title: "" +labels: needs triage +assignees: jmacdotorg +--- diff --git a/README.md b/README.md index bd76c6c5..8167aa97 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Welcome to the official docs for [**CodeRabbit**](https://coderabbit.ai), the co 2. Clone this repository: ```sh - git clone https://github.com/coderabbit-ai/coderabbit-docs.git + git clone https://github.com/coderabbitai/coderabbit-docs.git cd coderabbit-docs ``` diff --git a/docs/changelog.md b/docs/changelog.md index 97a10162..21d85d40 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -5,6 +5,84 @@ description: The latest updates and changes to CodeRabbit. sidebar_position: 13 --- +## August 4, 2025 + +### Model Context Protocol (MCP) Server Integration - Early Access + +Pro users can now connect CodeRabbit to your external tools and knowledge bases to provide more contextual code reviews. Our AI automatically pulls relevant information from your documentation, project management tools, and internal wikis to better understand your code changes and business requirements. Connect your custom MCP servers through Settings > Integrations to get reviews and chat conversations that understand your full development context. + +## August 1, 2025 + +### Dark Theme Support for UI App + +CodeRabbit app now supports Light, Dark, and System themes. Use the new theme toggle next to your profile to switch modes. + +## July 23, 2025 + +### ⚡️ Unit Test Generation - Beta + +CodeRabbit's unit test generation is now available in Beta! Automatically generate comprehensive unit tests for your code changes, ensuring better test coverage and catching edge cases you might miss. Our AI analyzes your code structure and creates tests that follow best practices and your project's testing patterns. Learn more [here](https://docs.coderabbit.ai/finishing-touches/unit-test-generation), or just try it under ✨ Finishing Touches. + +## July 17, 2025 + +### Enhanced Reporting Capabilities + +We're excited to announce significant improvements to our reporting system that will make your automated reports more powerful and actionable! + +#### Exclusion Filters with NOT_IN Option + +Reports now support exclusion filters using the `NOT_IN` option, allowing you to filter out pull requests based on their repository, label, user, or team. This gives you more granular control over what appears in your reports, helping you focus on the most relevant information. + +#### Next Steps Section in Daily Standup Reports + +We've enhanced the default daily standup report template to include a "Next Steps" section. This provides clear guidance on what actions authors and reviewers should take regarding each pull request or change, making your reports more actionable and helping teams stay on track. + +#### CI/CD GitHub Action Check Status Awareness + +Reports now include CI/CD GitHub Action check status as a data source. Your reports will be aware of which CI/CD checks are failing or passing, giving you better visibility into the health of your pull requests and helping identify potential issues before they become blockers. + +#### Score Card Custom Report Option + +We've added a new optional score card report feature that allows you to grade and create report cards for your developers. This custom report optional data source provides a structured way to evaluate developer performance and contributions. See our [custom reports documentation](/guides/custom-reports#remove-prs-without-a-score-cardchart-bot-comment) for more details on how to implement score cards in your reports. + +## July 10, 2025 + +### Enhanced Python Static Analysis: nbqa Support for Jupyter Notebooks + +We're excited to announce enhanced Python static analysis capabilities with nbqa support for Jupyter Notebooks! + +Our existing integrated [Ruff](https://docs.astral.sh/ruff/), [Flake8](https://flake8.pycqa.org/) and [Pylint](https://pylint.pycqa.org/) tools now support linting Jupyter Notebooks (`.ipynb` files) using [nbqa](https://github.com/nbQA-dev/nbQA). This allows you to maintain code quality across your Python projects, including Jupyter Notebooks. + +See our [Ruff](/tools/ruff), [Flake8](/tools/flake8), and [Pylint](/tools/pylint) documentation for more details. + +## July 3, 2025 + +### Enhanced Python Static Analysis: Flake8 Support + +We're excited to announce enhanced Python static analysis capabilities with [Flake8](https://flake8.pycqa.org/) support! + +[Flake8](https://flake8.pycqa.org/) is a Python linting utility that wraps PyFlakes, pycodestyle, and Mccabe to check your Python code for style and logical errors. + +See our [tools documentation](https://docs.coderabbit.ai/tools/) for more details. + +## July 1, 2025 + +### Enhanced Code Guidelines Support + +We've expanded our code guidelines scanning capabilities to provide even better code review experiences. CodeRabbit now automatically scans and learns from additional configuration files to understand your organization's coding standards and preferences. + +**New supported patterns:** + +- `**/.cursorrules` - Cursor IDE rules and preferences +- `.github/copilot-instructions.md` - GitHub Copilot instructions +- `**/CLAUDE.md` - Claude-specific coding guidelines +- `**/.cursor/rules/*` - Cursor rules directory +- `**/.windsurfrules` - Windsurf IDE rules +- `**/.clinerules/*` - Cline IDE rules +- `**/.rules/*` - General rules directory + +These guidelines are automatically analyzed and applied during code reviews to ensure consistency with your team's coding standards. You can configure these patterns in the knowledge base section of your CodeRabbit settings. + ## June 27, 2025 ### Enhanced PHP Static Analysis: PHPMD and PHPCS Support @@ -37,7 +115,7 @@ Key capabilities: - **Intelligent Test Generation**: Automatically creates unit tests that cover edge cases, error scenarios, and core functionality - **Context-Aware**: Generates tests that understand your existing codebase patterns and testing conventions -- **One-Click Integration**: Simply comment `@coderabbitai auto-generate unit tests` on any pull request or specific file, or click on the checkbox available in the walkthrough comment for Early Access customers. +- **One-Click Integration**: Simply comment `@coderabbitai generate unit tests` on any pull request or specific file, or click on the checkbox available in the walkthrough comment for Early Access customers. You can customize the generated tests to fit your specific requirements. @@ -184,7 +262,7 @@ import ProPlanNotice from "@site/src/components/ProPlanNotice.mdx" New and Improved Dashboards to provide more useful feedback such as: -- Avgerage PR Merge Time +- Average PR Merge Time - Weekly Pull Request Activity - Number of PRs Reviewed - Acceptance rate of CodeRabbit Suggestions diff --git a/docs/faq.md b/docs/faq.md index 8e5de723..f248b517 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -63,7 +63,7 @@ CodeRabbit works with all programming languages, with varying proficiency based - Available training data - Community usage patterns -### Whats the difference between CodeRabbit Code Reviews and CodeRabbit Reports? +### What's the difference between CodeRabbit Code Reviews and CodeRabbit Reports? CodeRabbit offers two distinct features that serve different roles in your development workflow: @@ -203,14 +203,15 @@ In-trial and open-source plans have lower rate limits than the paid plan. In all ::: -The following limits enforced _per developer_: +The following limits are enforced _per developer_: -| Feature | Free Plan | Trial Plan | OSS Plan | Pro/Lite Plan | -| ---------------- | ------------------------------------------ | ----------------------------- | ----------------------------- | ----------------------------- | -| Files per hour | 200/hour | 200/hour | 200/hour | 400/hour | -| Files per PR | 100 | 100 | 100 | 200 | -| Reviews per hour | 3 back-to-back, then 2/hour (Summary only) | 4 back-to-back, then 3/hour | 3 back-to-back, then 2/hour | 5 back-to-back, then 4/hour | -| Chat | N/A | 25 back-to-back, then 50/hour | 10 back-to-back, then 25/hour | 25 back-to-back, then 50/hour | +| Feature | Free Plan | Trial Plan | OSS Plan | Pro/Lite Plan | +| -------------------------------- | ------------------------------------------ | --------------------------------- | ----------------------------- | ----------------------------- | +| Files per hour | 200/hour | 200/hour | 200/hour | 400/hour | +| Files per PR | 100 | 100 | 100 | 200 | +| Reviews per hour | 3 back-to-back, then 2/hour (Summary only) | 4 back-to-back, then 3/hour | 3 back-to-back, then 2/hour | 5 back-to-back, then 4/hour | +| Reviews per hour (IDE Extension) | 1/hour | 5/hour (Pro trial), 1/hour(Other) | 1/hour | 5/hour (Pro), 1/hour(Lite) | +| Chat | N/A | 25 back-to-back, then 50/hour | 10 back-to-back, then 25/hour | 25 back-to-back, then 50/hour | ## Integration Guide {#integration-guide} diff --git a/docs/finishing-touches/unit-test-generation.md b/docs/finishing-touches/unit-test-generation.md index 57c5e211..71fe5431 100644 --- a/docs/finishing-touches/unit-test-generation.md +++ b/docs/finishing-touches/unit-test-generation.md @@ -10,18 +10,18 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; ``` :::warning -This feature is [experimental](/early-access#experiments). +This feature is in beta. ::: # Unit Test Generation Unit Test Generation is part of the [finishing touches](/future-development#finishing-touches). -Unit Test Generation is an Early Access Experimental feature. - ## Usage -Once you are done with your pull request and its reviews, you may want to perform finishing touches to your code, such as adding unit tests. You can request CodeRabbit to generate unit tests by typing `@coderabbitai auto-generate unit tests` in a comment under that pull request or by clicking a checkbox under **Generate Unit Tests** in the CodeRabbit Walkthrough. +![Unit Test Generation](/img/finishing-touches/utg.gif) + +Once you are done with your pull request and its reviews, you may want to perform finishing touches to your code, such as adding unit tests. You can request CodeRabbit to generate unit tests by typing `@coderabbitai generate unit tests` in a comment under that pull request or by clicking a checkbox under **Generate Unit Tests** in the CodeRabbit Walkthrough. Once sent, CodeRabbit will perform the following actions: diff --git a/docs/guides/about-vscode.md b/docs/guides/about-vscode.md index 3e484ffe..ada6f06f 100644 --- a/docs/guides/about-vscode.md +++ b/docs/guides/about-vscode.md @@ -35,3 +35,4 @@ The extension makes only basic CodeRabbit review features available, with defaul - [Install the VSCode extension](/guides/install-vscode) - [Use the VSCode extension](/guides/use-vscode) +- [Use with Self-hosted CodeRabbit](/guides/use-vscode-selfhosted) diff --git a/docs/guides/code-review-overview.md b/docs/guides/code-review-overview.md index cd511c76..6c571670 100644 --- a/docs/guides/code-review-overview.md +++ b/docs/guides/code-review-overview.md @@ -4,6 +4,8 @@ description: An overview of CodeRabbit's core code review features. sidebar_label: Overview --- +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx' + The central feature of CodeRabbit is its ability to proactively review new pull requests on your code repository. @@ -42,6 +44,15 @@ perform a code review: - 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. +### Which pull requests get automatically reviewed {#eligibility} + +CodeRabbit automatically reviews a pull request when **either** of the following statements is true: + +- The pull request is in a public repository. CodeRabbit reviews pull requests against the main branch of your public repositories by default. This feature is available to every subscription tier, including the free plan. +- The pull request is in a private repository and your organization is on the Pro plan with a seat assigned to you. Only under this condition does CodeRabbit review private-repository pull requests. + + + ## Interact with CodeRabbit reviews {#interact} After CodeRabbit attaches its initial code-review comment to a pull request, you can diff --git a/docs/guides/config-vscode.md b/docs/guides/config-vscode.md index 7a1fb8bd..8bd0672a 100644 --- a/docs/guides/config-vscode.md +++ b/docs/guides/config-vscode.md @@ -14,11 +14,11 @@ The instructions on this page are specific to using the extension with VSCode. I To navigate to the settings screen for the CodeRabbit VSCode extension, follow these steps: -1. In the activity bar, click the Extensions icon. +1. Open the CodeRabbit activity bar/sidebar. -1. In the sidebar, under **Installed**, click the gear-shaped **Manage** icon in the CodeRabbit row. +1. In the sidebar, click on gear shaped icon on top right(beside logout icon). -1. In the menu that appears, select **Settings**. +1. You can also search for CodeRabbit: Settings in the command palette to open the settings. The settings screen contains the following configuration controls. @@ -28,9 +28,21 @@ The **Agent Type** setting lets you choose the extension's response to using the - **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. + This works only with VSCode(using Copilot) and Cursor(you have to start the task). 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. +- **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](https://www.anthropic.com/claude-code) installed for this option to be effective. + +- **Codex CLI**: The extension opens the Terminal pane of your IDE and tries to use the `codex` command-line program to apply the suggested fix to your code. You need to have [Codex CLI](https://github.com/openai/codex) installed for this option to be effective. + +- **OpenCode**: The extension opens the Terminal pane of your IDE and tries to use the `opencode` command-line program to apply the suggested fix to your code. You need to have [OpenCode](https://opencode.ai) installed for this option to be effective. + +- **Cline**: The extension opens the `Cline` sidebar and runs a task to apply the suggested fix to your code. You need to have the [Cline](https://cline.bot/) extension installed for this option to be effective. + +- **Roo**: The extension opens the `Roo` sidebar and runs a task to apply the suggested fix to your code. You need to have the [Roo](https://github.com/RooCodeInc/Roo-Code) extension installed for this option to be effective. + +- **Kilo Code**: The extension opens the `Kilo Code` sidebar and runs a task to apply the suggested fix to your code. You need to have the [Kilo Code](https://kilocode.ai/) extension installed for this option to be effective. + +- **Augment Code**: The extension opens the `Augment Code` sidebar with the prompt to apply the suggested fix to your code, and you can start the task. You need to have the [Augment Code](https://www.augmentcode.com/) extension installed for this option to be effective. - **Clipboard**: The extension copies prompt text describing the suggested fix to your clipboard. From there, you can manually paste the prompt into the coding AI agent that you use with your IDE. @@ -48,11 +60,9 @@ The **Auto Review Mode** setting lets you control the behavior of the automatic 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`. +## Use with self-hosted CodeRabbit {#self-hosted-coderabbit} -To turn off timeouts, set this value to `0`. +This setting is only used when you're using a self-hosted instance of CodeRabbit. If you're using the CodeRabbit Cloud service, you don't need to configure this setting. You will need to login and logout of the extension after adding this value. ## What's next {#whats-next} diff --git a/docs/guides/configuration-overview.md b/docs/guides/configuration-overview.md index 2a0dce54..3e54ebbe 100644 --- a/docs/guides/configuration-overview.md +++ b/docs/guides/configuration-overview.md @@ -46,7 +46,39 @@ For more information, see [Set your repository preferences](/guides/repository-s 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). +## Configuration priority {#priority} + +CodeRabbit follows a specific hierarchy when determining which configuration settings to use. Understanding this priority system helps you manage your configuration effectively: + +### Priority order (highest to lowest) + +1. **Local `.coderabbit.yaml` file of head branch** +2. **Repository settings** (web UI) +3. **Organization settings** (web UI) + +### How priority works + +- **If you have a local `.coderabbit.yaml` file in your head branch**: All repository and organization settings are ignored. Only the local YAML file configuration is used. Anything not defined in that file uses default settings. +- **If you don't have a local YAML file but have enabled repository settings**: Organization settings are ignored. Only repository settings are used. +- **If you have organization settings and repository settings are disabled**: Only organization settings are used. + +### Configuration inheritance + +When a configuration source is active, it completely overrides all lower-priority sources. For example, if you set `reviews.tools.github-checks.timeout_ms` to `900000` in organization settings, but you have a local `.coderabbit.yaml` file that doesn't define this setting, CodeRabbit will use the default value of `90000` instead of the organization setting. + +This means that configuration is not merged or inherited - the highest priority source takes complete control over all settings. + ## 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. + +## Learnings {#learnings} + +As a complement to the configuration methods listed above, CodeRabbit keeps an internal database with _learnings_ that it collects about your team's code review preferences, based on your interactions with the CodeRabbit bot over time. CodeRabbit learnings let you fine-tune the ways that CodeRabbit conducts its code reviews in ways that are highly specific to your repositories, and your team's coding styles. + +For more information, see [Teach CodeRabbit your review preferences](/guides/learnings). + +## What's next {#whats-next} + +- [Initial configuration guide](/guides/initial-configuration) diff --git a/docs/guides/custom-reports.md b/docs/guides/custom-reports.md index f4759124..48d37a74 100644 --- a/docs/guides/custom-reports.md +++ b/docs/guides/custom-reports.md @@ -103,7 +103,7 @@ Contained within the `` tag. #### Summarized PR Details - ``: string - Contains the body of your pull request (aka the PR description at the top of the PR page). -- ``: string - Contains a file by file summary of the changes made in the PR in markdown format. This summary is generated by CodeRabbit AI durring the PR review process. This includes several sections for each file that was changed: +- ``: string - Contains a file by file summary of the changes made in the PR in markdown format. This summary is generated by CodeRabbit AI during the PR review process. This includes several sections for each file that was changed: - `filename`: string - The name of the file that was changed. - `AI-generated summary of changes`: markdown - An overall summary of the changes made in the file. - `Alterations to the declarations of exported or public entities`: markdown - A more specific breakdown of the changes made to the file such as exactly what was added, removed, or modified. @@ -117,6 +117,14 @@ Contained within the `` tag. - ``: datetime - The date and time the comment was last updated. - ``: markdown - The content of the comment. +#### CI/CD Check Status + +- ``: array of check objects - Contains all CI/CD checks for the PR. _GitHub Only_. +- ``: object - Each individual check is wrapped in this tag and is an object with the following properties: + - ``: string - The name of the CI/CD check. + - ``: string - The status of the check (e.g., "success", "failure", "in_progress", "canceled"). + - ``: string - The URL to view the detailed results of the check. + Here's an example prompt that uses these data points: ```text @@ -295,6 +303,166 @@ Issues and tickets brings in conversations, descriptions, and comments from Jira - ``: markdown - The description of the issue. - ``: array of comment objects - Contains all the comments made on the issue. +#### Remove PRs without a "Score Card/Chart" bot comment + +This option gives you the ability to create a report limited only to pull requests containing a "Score Card" or "Score Chart" bot comment from CodeRabbit or other bots. To enable issues and tickets you must include the tag `` in your prompt. + +> **IMPORTANT:** This will automatically remove any pull requests from your reports if they do not contain a "Score Card" or "Score Chart" bot comment. Using this option without setting up a flow to create these comments will result in `No new pull request activity in the last XYZ hours` errors. Do not enable this option unless you have asked CodeRabbit to create a "Score Card" through a comment or implemented the "Score Chart" bot comment flow below. + +For example, you can ask CodeRabbit to check several conditions on a pull request and produce a "Score Chart": + +
+Click to view example User Score Card/Chart Comment: + +![Score Card/Chart Trigger Comment Example](/img/guides/score-card-trigger-comment.png) + +```markdown +@coderabbitai +Use the to guide the content of the summary. Use the format shown in <\_example> but do not include or refer to the example's content in the final summary/report. + + + +**Instructions:** +Generate a weekly code review report for the author of this pull request only following scoring parameters. Calculate the scores and compile the results into a table so that the team-wise average score can be easily determined. +**Scoring Parameters:** + +1. **Basic Code Standards (Score out of 2)** + + - Avoidance of hard-coded values + - No repetition of code (DRY principle) + +2. **Code Readability (Score out of 2)** + + - Presence of meaningful comments + - Proper variable declaration using `const` and `let` + +3. **Error Handling (Score out of 4)** + + - Handling failure scenarios (e.g., try-catch, fallbacks) + - Proper loading state implementation (e.g., button click loading states) + - Handling edge cases (e.g., checking for undefined or missing values) + - Input validation (ensuring correct user inputs) + +4. **Circle CI Check Validation (Score: 0 or 1)** + - `0` → Not Passed + - `1` → Passed + +**Final Score Calculation:** +Combine the scores from the parameters above to derive the final code quality score (out of 9). +**Output Format:** +Provide the final report in a table format with the following columns (use shorthand notations), be sure to include this list at the top above the chart in the "Column Notation" section so users understand what the columns mean: + +- **User Name (User)** +- **Basic Code Standards (BCS) (out of 2)** +- **Code Readability (CR) (out of 2)** +- **Error Handling (EH) (out of 4)** +- **Shopify Theme Check (CI) (out of 1)** +- **Final Code Quality Score (FCQS) (out of 9)** + + + +<\_example> + +## Column Notation + +- **User Name (User)** +- **Basic Code Standards (BCS) (out of 2)** +- **Code Readability (CR) (out of 2)** +- **Error Handling (EH) (out of 4)** +- **Shopify Theme Check (CI) (out of 1)** +- **Final Code Quality Score (FCQS) (out of 9)** + +## Score Chart + +| User | BCS (2) | CR (3) | EH (2) | CI (1) | FCQS (9) | +| -------- | ------- | ------ | ------ | ------ | -------- | +| John Doe | 2 | 3 | 2 | 1 | 9 | + + +``` + +
+ +Then CodeRabbit will reply with a score for you pull request: + +
+Click to view resulting Score Card/Chart bot comment: + +![CodeRabbit Score Card/Chart Result Comment Example](/img/guides/score-card-result-comment.png) + +
+ +You can then utilize this in a report. We recommend your report looks specifically for these score cards and puts together a unified report: + +
+Click to view example Report Prompt when using Score Card/Chart: + +![Report Example](/img/guides/score-card-report-result.png) + +![Where to put this prompt](/img/guides/where-score-report-prompt-go.png) + +Prompt Example: + +```markdown +Use the to guide the content of the summary. Use the format shown in but do not include or refer to the example's content in the final summary/report. + + +**Instructions:** + +Locate the score chart comment in the . There will be a single comment with data on these fields: + +- **User Name (User)** +- **Basic Code Standards (BCS) (out of 2)** +- **Code Readability (CR) (out of 2)** +- **Error Handling (EH) (out of 4)** +- **Shopify Theme Check (CI) (out of 1)** +- **Final Code Quality Score (FCQS) (out of 9)** + +These details may also be in the form of a chart such as: + +## Score Chart + +| User | BCS (2) | CR (3) | EH (2) | CI (1) | FCQS (9) | +| -------- | ------- | ------ | ------ | ------ | -------- | +| John Doe | 2 | 3 | 2 | 1 | 9 | + +You will create a new chart averaging all the values from various pull requests for each author. Only include pull requests with a `Score Chart`. Do not invent or create score charts if none exist. + + + + + +## Column Notation + +- **User Name (User)** +- **Basic Code Standards (BCS) (out of 2)** +- **Code Readability (CR) (out of 2)** +- **Error Handling (EH) (out of 4)** +- **Shopify Theme Check (CI) (out of 1)** +- **Final Code Quality Score (FCQS) (out of 9)** + +## Score Chart + +| User | BCS (2) | CR (3) | EH (2) | CI (1) | FCQS (9) | PR URL | +| -------- | ------- | ------ | ------ | ------ | -------- | ------ | +| John Doe | 2 | 3 | 2 | 1 | 9 | URL | +| Alex Foo | 2 | 3 | 2 | 1 | 9 | URL | + + + + +``` + +
+ +**Best Practices for Score Cards/Charts:** + +- The reporting bot only has access to your comments and summary (like a project manager) if you want to make a report looking for these score card/chart comments make sure the reviewer does this ahead of time. +- Only include checks for very specific scenarios, such as a specific check failing or using tabs vs spaces. +- Do not use general rules without explaining specifically what they mean. If you add "Insure the pull request follows development best practices" you must define what "development best practices" actually mean or the AI will guess. +- Make one point for each specific check and make sure its a True/False condition. +- Instead of manually commenting on pull requests, you can use the [GitHub Actions Bot](https://github.com/marketplace/actions/create-or-update-comment) to automatically comment on pull requests and trigger CodeRabbit score card/chart comments by including `@coderabbitai` in the comment. + ## Best Practices 1. **Be Specific** diff --git a/docs/guides/initial-configuration.md b/docs/guides/initial-configuration.md index 3df69e8b..5cea2afd 100644 --- a/docs/guides/initial-configuration.md +++ b/docs/guides/initial-configuration.md @@ -57,7 +57,7 @@ For more information, see ### 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. +CodeRabbit learns your team's review preferences by letting you [teach it your preferences in plain language during code reviews](/guides/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. @@ -72,13 +72,14 @@ By default, CodeRabbit writes thorough code reviews with several sub-sections. I - [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 +- [Suggested reviewers](/reference/configuration#suggested-reviewers): 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. +You can give CodeRabbit additional instructions for reviewing specific files or +locations in your repository, or configure CodeRabbit to disregard certain file paths +during code reviews. For an overview about using path-based instructions in CodeRabbit, see [Path-based instructions](/guides/review-instructions#path-based). diff --git a/docs/guides/install-vscode.md b/docs/guides/install-vscode.md index 03dfa98c..99e3b662 100644 --- a/docs/guides/install-vscode.md +++ b/docs/guides/install-vscode.md @@ -59,5 +59,5 @@ If you do install the extension this way, then you still need to connect your Co ## What's next - [Use the VSCode extension](/guides/use-vscode) - - [Configure the VSCode extension](/guides/config-vscode) +- [Use with Self-hosted CodeRabbit](/guides/use-vscode-selfhosted) diff --git a/docs/guides/learnings.md b/docs/guides/learnings.md new file mode 100644 index 00000000..38477db6 --- /dev/null +++ b/docs/guides/learnings.md @@ -0,0 +1,124 @@ +--- +title: Teach CodeRabbit your review preferences +description: An overview of the CodeRabbit learnings feature. +--- + +This page describes how you can configure the code-review behavior of CodeRabbit using natural-language +chat. + +For a conceptual overview of CodeRabbit configuration methods, see [Configure CodeRabbit](/guides/configuration-overview). For more information about performing code reviews with CodeRabbit, see +[Review pull requests](/guides/code-review-overview). + +## About CodeRabbit learnings {#about} + +As your team works with CodeRabbit, it learns your team's code-review +preferences based on chat interactions, and adds these preferences +to an internal database that it associates with your Git platform organization. We call these internal records _learnings_. + +
+ +
+ +CodeRabbit learnings are flexible, natural-language statements about code-review preferences whose purpose can include the following: + +- Special instructions about reviewing particular files. +- Guidance for reviewing all of the files of one repository. +- Code-review preferences that CodeRabbit must apply across all of your organization's repositories. + +Every time CodeRabbit prepares to add a comment to a pull request or issue, it loads all of the learnings that it has collected about your organization's code review preferences. CodeRabbit applies these learnings as additional context or instructions for its comment. + +CodeRabbit learnings complement the more traditional configuration that you set for your organization and its repositories using the CodeRabbit web interface or [`.coderabbit.yaml` files](/getting-started/configure-coderabbit). Learnings give you a convenient way to quickly set or correct the behavior of CodeRabbit in ways that are highly specific to your team's coding style, or in ways that the CodeRabbit configuration options don't otherwise account for. + +You can review and edit your organization's CodeRabbit learnings at any time, as detailed later in this page. + +## Add learnings {#add} + +To add learnings to the database CodeRabbit keeps about your organization's preferences, communicate +your preferences directly to the appropriate CodeRabbit service account using natural language, in a comment attached to any pull request or issue. For more information about chatting with CodeRabbit using comments, see [CodeRabbit chat](/guides/agent_chat/). + +If CodeRabbit decides to create one or more learnings based on a comment, then it makes this explicit in its response to that comment by adding a collapsible section titled **Learnings Added** to its own response comment. + +### An example of adding a learning {#example} + +Imagine a scenario where CodeRabbit has reviewed a GitHub-based pull request from your team that adds a feature to an authentication middleware library. CodeRabbit has flagged a certain file as needing improvement, attaching this comment to the relevant lines in its review: + +> Consider using nested try-catch blocks here to handle different error scenarios more comprehensively. + +If this critique disagrees with your team's coding practices specific to try-catch blocks, then you can reply to this CodeRabbit using a comment of your own, addressed to the `@coderabbitai` service account on GitHub: + +> @coderabbitai Actually, we've found that nested try-catch blocks make our auth middleware harder to debug in production. We prefer early returns with specific error codes - it's cleaner and our monitoring tools can track them better. + +CodeRabbit considers your reply, and decides to make a learning out of it. It acknowledges this in another reply: + +> You're absolutely right about the debugging benefits. Early returns with specific error codes do provide better clarity and monitoring capabilities. I'll remember this preference for your authentication middleware. Thank you for the guidance! + +CodeRabbit also adds a **Learnings added** section to this comment, making explicit the fact that this chat has modified its future behavior with your team. + +CodeRabbit then creates a new learnings record for itself. Along with metadata such as the pull request number, filename, and GitHub user associated with the learning, CodeRabbit adds this self-instructive text to the new record: + +> In authentication middleware, prefer returning early with specific error codes rather than nested try-catch blocks. This improves readability and makes error tracking easier in production environments. + +### Best practices for new learnings {#best-practices} + +When communicating with CodeRabbit during an active code review, you can help make any resulting learnings more specific by replying directly to review comments that CodeRabbit has left on specific files, rather than leaving comments on the overall pull request. This gives CodeRabbit more context when considering feedback, allowing it to create more specific learnings. + +## View learnings {#view} + +To view the learnings that CodeRabbit has associated with your organization, +follow these steps: + +1. Visit [the CodeRabbit web interface](https://app.coderabbit.ai/settings/repositories). + +1. In the sidebar, click **Learnings**. + +This displays a paged list of all of the learnings associated with your organization, sorted by creation time, newest-first. To see more details about any learnings record, click its text. + +### Filter displayed learnings {#filter} + +Over time, the learnings that CodeRabbit gathers for your organization can become quite numerous. This can make manually browsing the full list difficult. The CodeRabbit web interface has search and filtering tools to help you find specific learnings, based on the topic of the learning text, or on other metadata. + +To filter the displayed learnings by topic or concept, enter that topic or concept into the **Similarity search** field, and set **Top K** to the number of results you want returned. Because this is a vector-based similarity search, the returned learnings don't necessarily contain the exact text of your search terms. + +For example, to see the top ten learnings that have to do with error reporting, enter `error reporting` into **Similarity search** and set **Top K** to `10`. + +To filter the displayed learnings by repository, user, or file path, click **+ Filters**, and select additional criteria. + +### Edit or delete learnings {#edit} + +If your account has the **Admin** [CodeRabbit role](/guides/roles) with your organization, then you can freely edit the text of any stored learning, or delete it outright. + +To edit or delete a learning, follow these steps: + +1. Click the **Action** menu on the learning record, which resembles three dots. + +1. Select **Edit** or **Delete**. + +## Configure learnings storage and application {#configure} + +CodeRabbit has several configuration options that modify the storage and application of learnings. + +### Opt out of learnings storage {#opt-out} + +CodeRabbit enables learnings by default. To disable learnings, modify one of the following configuration options: + +- To disable all CodeRabbit [knowledge base](/integrations/knowledge-base) features for your organization or repository, which includes learnings, enable [the _Opt out_ setting](/reference/configuration#opt-out). + +- To disable all CodeRabbit features that require long-term data retention about your organization's use of CodeRabbit—including learnings—disable [the _Data retention_ setting](/reference/configuration#data-retention). + +:::warning +Disabling data retention immediately and irrevocably deletes all learnings that CodeRabbit has associated with your organization. +::: + +### Specify the scope of applied learnings {#scope} + +[The Learnings configuration setting](/reference/configuration#learnings) lets you specify the _scope_ that CodeRabbit applies to all +of the learnings it has collected about your organization. You can set this option to one of the +following values: + +- **`auto`**: When reviewing a public repository, CodeRabbit applies only the learnings specific to that repository. When reviewing private repository, CodeRabbit applies all of your organization's learnings. This is the default setting. +- **`global`**: CodeRabbit applies all of your organization's learnings to all code reviews. +- **`local`**: CodeRabbit applies only learnings associated with code reviews' respective repositories. + +## What's next {#whats-next} + +- [Add review instructions](/guides/review-instructions) diff --git a/docs/guides/ondemand-reports.md b/docs/guides/ondemand-reports.md index ee385622..49214e32 100644 --- a/docs/guides/ondemand-reports.md +++ b/docs/guides/ondemand-reports.md @@ -14,7 +14,7 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; This page is about using the CodeRabbit API to generate on-demand reports about your organization's usage of CodeRabbit. For a conceptual overview of reports in CodeRabbit, see [Generate reports](/guides/reports-overview). -If you're new to CodeRabbit's reporting features, then we recommend starting with [Scheduled reports](/guides/scheduled-reports) to understand the available options and capabilities. +If you're new to CodeRabbit's reporting features, then we recommend starting with [Scheduled reports](/guides/scheduled-reports) to understand the available options and capabilities. In almost every scenario we recommend using the **Scheduled Reports** option. The **On-demand Report** does not have any additional benefits from the **Scheduled Reports** and has many limitations. ## API Access diff --git a/docs/guides/reports-overview.md b/docs/guides/reports-overview.md index 4d8759ed..5095364f 100644 --- a/docs/guides/reports-overview.md +++ b/docs/guides/reports-overview.md @@ -17,16 +17,16 @@ You can track and analyze pull request activity across your organization's repos There are two ways to generate reports: -- **[Scheduled Reports](/guides/scheduled-reports)**: Set up automated, recurring reports that are delivered to your team on a set schedule. Supported delivery channels include the following: +- **[Scheduled Reports](/guides/scheduled-reports)**: Set up automated, recurring reports that are delivered to your team on a set schedule. **Use this option if you want to adjust your settings and send a report more than once**. Supported delivery channels include the following: - Email - Discord - Slack - Teams -- **[On-demand Reports](/guides/ondemand-reports)**: If you require customized integration of reports with your own tools and workflows, then you can generate reports programmatically through our API. +- **[On-demand Reports](/guides/ondemand-reports)**: If you want to test a report format and produce a single report once, try the "On-demand Reports" Option. You can also generate reports programmatically through our API, but we do not recommend this as the API reporting is in beta. If you want to run an **On-demand Report** more than once then you must use the **Scheduled Reports** option. -For your first reports, we recommend exploring scheduled reports. Its web-based UI can help you get familiar with the options available to you. +In almost every scenario we recommend using the **Scheduled Reports** option. The **On-demand Report** does not have any additional benefits from the **Scheduled Reports** and has many limitations. ## Customize reports using natural language {#customize} diff --git a/docs/guides/scheduled-reports.md b/docs/guides/scheduled-reports.md index 34c59032..cef41d46 100644 --- a/docs/guides/scheduled-reports.md +++ b/docs/guides/scheduled-reports.md @@ -52,11 +52,12 @@ Choose a time that works for all team members, especially for distributed teams ### Report Parameters -Reports can be filtered using multiple parameters: +Reports can be filtered using multiple parameters, match pull requests using the **IN** option and exclude pull requests using the **NOT_IN** option: - **Repositories**: Select specific repositories to monitor - **Labels**: Filter by GitHub labels with operators: - IN: Match any selected label + - NOT_IN: Exclude any pr with select label - ALL: Match all selected labels - **Users**: Filter by specific GitHub users - **Teams**: Filter by organization teams diff --git a/docs/guides/setup-best-practices.md b/docs/guides/setup-best-practices.md index c6caa094..0533da5e 100644 --- a/docs/guides/setup-best-practices.md +++ b/docs/guides/setup-best-practices.md @@ -1,6 +1,6 @@ --- title: "Setup and configuration best practices" -description: Best practices for seting up CodeRabbit. +description: Best practices for setting up CodeRabbit. sidebar_label: Setup and configuration --- diff --git a/docs/guides/use-vscode-selfhosted.md b/docs/guides/use-vscode-selfhosted.md new file mode 100644 index 00000000..4452ad8d --- /dev/null +++ b/docs/guides/use-vscode-selfhosted.md @@ -0,0 +1,29 @@ +--- +title: Use with self-hosted CodeRabbit +description: How to setup the VSCode extension with self-hosted CodeRabbit +--- + +This page is about setting up the VSCode extension with self-hosted CodeRabbit. If you are instead using the managed offering, see [Install the VSCode extension](/guides/install-vscode). + +## Prerequisites + +1. Your extension version should be greater than `0.12.1`. +2. Logout of the extension if previously logged in. + +## Connect your self-hosted instance{#connect-self-hosted-instance} + +To connect the VSCode extension to your self-hosted instance, follow these steps: + +1. Click on the "Self hosting CodeRabbit?" button, below the "Use CodeRabbit for free" button. +2. Enter your self-hosted instance URL when prompted. + - Make sure the instance URL is reachable within your network and websocket connections are allowed. +3. Select your git provider which you are using with your self-hosted CodeRabbit. (GitLab, Self-Hosted Gitlab, GitHub, GitHub Enterprise) + - If using GitHub or GitHub Enterprise, enter your [Github Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) when prompted. + +You should be connected to your self-hosted instance and ready to use the VSCode extension. + +## What's next {#whats-next} + +- [Use the VSCode extension](/guides/use-vscode) +- [Configure the VSCode extension](/guides/config-vscode) +- [Uninstall the VSCode extension](/guides/uninstall-vscode) diff --git a/docs/guides/use-vscode.md b/docs/guides/use-vscode.md index bfacd87b..169dc2a8 100644 --- a/docs/guides/use-vscode.md +++ b/docs/guides/use-vscode.md @@ -18,7 +18,7 @@ You can let CodeRabbit automatically review commits that you make to your local To perform an automatic review, follow these steps: -1. Perform a Git commit using VSCode. After you do this, a dialog appears in your VSCode window, asking **Would you like to start a review?** +1. Perform a Git commit using VSCode or terminal. After you do this, a dialog appears in your VSCode window, asking **Would you like to start a review?** 1. Click **Yes**. The CodeRabbit sidebar appears in your VSCode window. diff --git a/docs/integrations/knowledge-base.md b/docs/integrations/knowledge-base.md index 1da862e0..24b2d1be 100644 --- a/docs/integrations/knowledge-base.md +++ b/docs/integrations/knowledge-base.md @@ -1,5 +1,5 @@ --- -title: Apply your code review preferences +title: Knowledge base overview description: Learn about CodeRabbit's internal knowledge base and its integrations with external services. --- @@ -17,26 +17,25 @@ For example, you can add a comment in a PR to chat directly with CodeRabbit. `@c Or you can comment directly on some lines of code in the PR. `@coderabbitai do not complain about lack of error handling here, it is handled higher up the execution stack.` -:::tip Video Tutorial +For more information, see [Teach CodeRabbit your review preferences](/guides/learnings). -Watch our [video walkthrough on learnings](https://www.youtube.com/watch?v=Yu0cmmOYA-U) for more information. +## Code Guidelines {#code-guidelines} -::: +CodeRabbit can read _code guideline_ files that set standards and expectations about +your team's coding practices, described in natural language. CodeRabbit applies any instructions it reads from a repository's code guideline files to all subsequent code reviews. -## Code Guidelines {#code_guidelines} +By default, CodeRabbit looks for and loads guideline files used by other AI coding assistants, including the following: -CodeRabbit will analyse and learn from your organisation's code guidelines, which you can set up in the knowledge base section. These guidelines will then be used to conduct thorough code reviews. +- Claude Code +- Cursor +- Gemini +- GitHub Copilot +- Windsurf -The following patterns are scanned by default. +You can also mark any other file +or set of files in your repository as code guidelines by providing CodeRabbit with a list +of paths to those files. -```text -**/.cursorrules -.github/copilot-instructions.md -**/CLAUDE.md -**/.cursor/rules/* -**/.windsurfrules -**/.clinerules/* -**/.rules/* -``` +This feature is enabled by default; you can disable it if needed. -![Illustration of code guidelines configuration](/img/knowledge-base/code-guidelines.png) +For more information about configuring the code guidelines feature, see [Code guidelines](/reference/configuration#code-guidelines) in the configuration reference page. diff --git a/docs/platforms/azure-devops.md b/docs/platforms/azure-devops.md index 12b70765..b88ebcd7 100644 --- a/docs/platforms/azure-devops.md +++ b/docs/platforms/azure-devops.md @@ -94,9 +94,8 @@ Follow these steps to generate the token: 5. Select the organization you want to use the token with or select "All accessible organizations." 6. Enter a name and an expiry date for the token. -7. We need to have read & write access to "Work Items" & "Code" to post reviews - on pull requests. If you are on the Pro tier also add "Build" access for pipeline - failure remediation. -8. Click "Create" +7. Grant **Read, write, & manage** access to "Work Items" and "Code". CodeRabbit needs these permissions to post code reviews on pull requests. +8. If you subscribe to CodeRabbit Pro, then you can also grant **Read** access to "Build" for pipeline failure remediation. +9. Click "Create" ![CodeRabbit azure devOps personal access token creation form](/img/integrations/azure-access-token.png) diff --git a/docs/platforms/bitbucket-cloud.md b/docs/platforms/bitbucket-cloud.md index 286321d5..385d46ed 100644 --- a/docs/platforms/bitbucket-cloud.md +++ b/docs/platforms/bitbucket-cloud.md @@ -13,90 +13,90 @@ CodeRabbit integrates with Bitbucket Cloud to enhance code review and collaborat This guide will assist you in effectively integrating CodeRabbit with Bitbucket Cloud. -## Configure App Password +## Configure API Token -To enable CodeRabbit to interact with your Bitbucket repositories, an app password is required. This token grants the necessary permissions for interacting with the Merge Requests and Discussions APIs. +To enable CodeRabbit to interact with your Bitbucket repositories, an API token is required. This token grants the +necessary permissions for interacting with the Bitbucket merge request and discussion APIs. 1. Create a new Bitbucket account specifically for CodeRabbit and treat it as a service account. 2. Name the account "CodeRabbit". -3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this new account. -4. Generate an App Password to enable seamless integration between CodeRabbit and your Bitbucket repositories. +3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this + new account. +4. Generate an API Token to enable seamless integration between CodeRabbit and your Bitbucket repositories. -We recommend creating a new user as a service account, associating this user to the workspace you'd like to install CodeRabbit on, and providing CodeRabbit with the app password to allow access. During the installation process, CodeRabbit will automatically configure the required webhook for seamless integration. - -
- Bitbucket user modal -
+We recommend creating a new user as a service account, associating this user to the workspace you'd like to install +CodeRabbit on, and providing CodeRabbit with the API token to allow access. During the installation process, CodeRabbit +will automatically configure the required webhook for seamless integration. :::note -If you wish to change the review user, you must provide the app password for the new user who will post reviews and comments. However, this requires manually removing the previous user from the projects and associated webhooks. Once this is done, you will need to reinstall the CodeRabbit app for each project. +If you wish to change the review user, you must provide the API token for the new user who will post reviews and +comments. However, this requires manually removing the previous user from the projects and associated webhooks. Once +this is done, you will need to reinstall the CodeRabbit app for each project. ::: ### Recommendations -- **Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better access control. +- **Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better + access control. - **Use "CodeRabbit" as the username** - This makes the user easily recognizable for future reference. - **Use a dedicated email address** - This helps in easy identification and management. -- **Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo from [here](/img/integrations/logo.svg "download"). -- **Developer Access** Ensure the service account user has developer access to the projects that you wish to install CodeRabbit on. +- **Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo + from [here](/img/integrations/logo.svg "download"). +- **Developer Access** Ensure the service account user has developer access to the projects that you wish to install + CodeRabbit on. #### Key Points to Remember -- Code reviews will be attributed to the owner of the app password. +- Code reviews will be attributed to the owner of the API token. -#### Generating an App password +#### Generating an API token -Bitbucket provides an option to generate an app password for a new user. Follow these steps to generate the password: +Bitbucket provides an option to generate an API token for a new user. Follow these steps to generate the token: -1. Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews and related activities. -2. Go to "Personal Bitbucket Settings". -3. Choose **App passwords**. -4. Click **Create app password**. -5. Enter a label easily recognizable for this app passwords usage. +1. Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews + and related activities. +2. Go to [API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens). +3. Click **Create API token with scopes**. +4. Enter a name easily recognizable for this API token usage and an expiration date based on your plan of using the + product. +5. On next step select **Bitbucket** 6. Ensure the following scopes are selected: - 1. Account - Read - 2. Issues - Write - 3. Workspace membership - Read - 4. Projects - Write - 5. Repositories - Write - 6. Pull requests - Write - 7. Webhooks - Read and write - 8. Pipelines - Read - 9. Runners - Read + - read:account + - read:user:bitbucket + - write:issue:bitbucket + - read:issue:bitbucket + - read:workspace:bitbucket + - admin:project:bitbucket + - write:webhook:bitbucket + - read:webhook:bitbucket + - read:pipeline:bitbucket + - read:runner:bitbucket + - read:repository:bitbucket + - write:repository:bitbucket + - read:pullrequest:bitbucket + - write:pullrequest:bitbucket 7. Click **Create** -8. Note down the app password as it will only be displayed once. - -
- Bitbucket app password configuration page -
-
- Bitbucket app password permissions -
+8. Note down the API token as it will only be displayed once. -### Where to Provide CodeRabbit the App Password +### Where to Provide CodeRabbit the API Token -By default, if no app password is provided, CodeRabbit will prompt you to provide one during the installation process. However, if you wish to provide the token beforehand, you can do so by navigating to the **Organization Settings** tab, and selecting the **Bitbucket User** tab on the sidebar. Once entering the app password, the password will be validated and saved for future use. +By default, if no API token is provided, CodeRabbit will prompt you to provide one during the installation process. +However, if you wish to provide the token beforehand, you can do so by navigating to the **Organization Settings** tab, +and selecting the **Bitbucket User** tab on the sidebar. Once entering the API token, the token will be validated and +saved for future use. -You can confirm the correct user is being selected by verifying the user ID shown on the UI with the user ID of the service account user you created. +You can confirm the correct user is being selected by verifying the user ID shown on the UI with the user ID of the +service account user you created. --- ### Installing CodeRabbit into your Bitbucket Repositories 1. Go to the [Repositories page](https://app.coderabbit.ai/settings/repositories) in the CodeRabbit app. -2. Select the checkbox next to the repositories where you want to install CodeRabbit. To install it on all repositories at once, select the checkbox at the top. +2. Select the checkbox next to the repositories where you want to install CodeRabbit. To install it on all repositories + at once, select the checkbox at the top. 3. Select **Install Repositories**.
@@ -121,10 +121,12 @@ The webhook `https://coderabbit.ai/bitbucketHandler` will now be installed for t :::note -If you are experiencing issues with the webhook, such as CodeRabbit not being able to access the repository, or not reviewing pull requests, you can manually delete the webhook to the repository. +If you are experiencing issues with the webhook, such as CodeRabbit not being able to access the repository, or not +reviewing pull requests, you can manually delete the webhook to the repository. Then refresh the repository page in the CodeRabbit app and you can reinstall the webhook. -If you cannot install the webhook please check that your Bitbucket user has the necessary permissions to install the webhook and the App Password is properly configured. +If you cannot install the webhook please check that your Bitbucket user has the necessary permissions to install the +webhook and the API Token is properly configured. ::: diff --git a/docs/platforms/github-com.md b/docs/platforms/github-com.md index 60d919d7..c318307d 100644 --- a/docs/platforms/github-com.md +++ b/docs/platforms/github-com.md @@ -1,116 +1,110 @@ --- -title: Integrating CodeRabbit with GitHub.com +title: Integrate with GitHub.com description: Learn how to integrate CodeRabbit and add to your GitHub workflow. sidebar_label: GitHub.com -sidebar_position: 1 --- This is a step-by-step guide to integrate CodeRabbit with your GitHub repositories. -> **CodeRabbit** is an AI code reviewer designed to ease the challenges of code review, supporting repository maintainers and teams. It reviews your PRs and provides concise summaries, identifies potential issues, and offers insights that might be missed during manual reviews. +For an overview of how CodeRabbit integrates with Git platforms, see +[Add CodeRabbit to your repository](/platforms). -## How CodeRabbit Works? +For a hands-on tutorial with CodeRabbit performing code reviews on a live +GitHub repository that you create, see [Quickstart](/getting-started/quickstart). -> CodeRabbit integrates with GitHub, automating the code review process from the moment a pull request is created. +## Before you begin -It preprocesses the PR content, builds context, leverages Large Language Models for analysis, and then post-processes the AI response before posting the review back to GitHub. This streamlined workflow ensures thorough AI-powered code reviews without manual intervention. +You need to have a GitHub account, and ownership-level permissions of at least one repository associated with that account. -![How CodeRabbit Works](/img/integrations/how-codeRabbit-works.png) +If you want to authorize CodeRabbit to write code reviews for a repository contained in a GitHub organization, then you need ownership-level permission with that organization, as well. -## Let's Integrate CodeRabbit with GitHub +## Authorize CodeRabbit with your GitHub account -### 1. Accessing CodeRabbit +Before you can use CodeRabbit with GitHub, you need to +authorize CodeRabbit with your GitHub account. To do this, follow these steps: -Visit the [CodeRabbit login](https://app.coderabbit.ai/login?free-trial) page. You'll see all the authentication options, select "**Login with GitHub**" to proceed. +1. Visit [the CodeRabbit login page](https://app.coderabbit.ai/login). -![CodeRabbit Login](/img/integrations/login-self-hosted-github.png) +1. Click **Login with GitHub**. Your browser navigates to GitHub.com. -### 2. Authorization +1. If GitHub prompts to sign in to your GitHub account before continuing, then enter your GitHub login credentials as you normally would. Otherwise, continue to the next step. -When you choose **Login with GitHub** in step1, you'll be prompted to authorize CodeRabbit. +1. GitHub displays a summary of the information that CodeRabbit needs in order to integrate with your + GitHub account. This includes read-only access to the following: -> This step grants the necessary permissions for CodeRabbit to interact with your repositories and pull requests. + - Organizations and teams that are associated with your GitHub account. + - Email addresses that are associated with your GitHub account. -![Authorization Login](/img/integrations/authorization-codeRabbit.png) + To allow CodeRabbit access to this information, click **Authorize coderabbitai**. -### 3. Selecting Your Organization +After you complete these steps, your browser navigates to the CodeRabbit web interface. -Upon Authorization, If you're part of multiple organizations, you'll have the opportunity to choose which one you want to associate with CodeRabbit. This ensures that you're setting up the tool for the correct team or project. +Now that you've integrated CodeRabbit with your GitHub account, you need to give CodeRabbit additional permissions to work with your code repositories. To do this, see the next section. -![How to Select Organization in CodeRabbit](/img/integrations/select-organization.png) +## Allow CodeRabbit to access your repositories -### 4. Exploring the CodeRabbit Dashboard +Even after you've integrated CodeRabbit with your GitHub account, you need to +separately grant CodeRabbit the permissions that it needs to post code reviews and +create pull requests in your repositories. -Upon successful authorization, you'll be logged into the CodeRabbit user interface. +You need to authorize CodeRabbit separately for each GitHub organization whose repositories you want it to work with. You can give CodeRabbit permission to +work with all of the repositories associated with a GitHub organization, or limit its access to a select list. -Here, you can add repositories and configure CodeRabbit config settings for each repository. +### Overview of required permissions -![CodeRabbit Dashboard](/img/integrations/codeRabbit-dashboard.png) +CodeRabbit requires the following permissions to work with your repositories: -:::tip -If you opt to authorize all repositories during setup, CodeRabbit will automatically include any new repositories you create on GitHub in the future. This saves you the hassle of manual additions down the line. -::: - -### 5. CodeRabbit Configuration - -You can configure CodeRabbit through a YAML file or using the [App's UI](https://app.coderabbit.ai/login?free-trial). +- Read-only access to actions, checks, discussions, members, and metadata. -You can tailor CodeRabbit's functionality using the `.coderabbit.yaml` file, which you place directly in your GitHub repository. This file mirrors the options available in the CodeRabbit user interface, with each setting in the YAML corresponding to a specific toggle in the UI. Configure CodeRabbit either through the coderabbit.yaml file or the interface, depending on your preference. +- Read-and-write access to code, commit statuses, issues, and pull requests. :::note - -If a `.coderabbit.yaml` file exists in your GitHub repository, it takes precedence over any UI settings. Choose either the YAML file or UI configuration - you don't need to use both. **Refer CodeRabbit YAML schema [here](https://storage.googleapis.com/coderabbit_public_assets/schema.v2.json)** - +CodeRabbit requests read and write access to your repository in order for its code review, issue management, and pull request generation features to work. CodeRabbit never stores your code. For more information, see [the CodeRabbit Trust Center](https://trust.coderabbit.ai). ::: -Once your `.coderabbit.yaml` file is prepared according to your needs, simply place it in your GitHub repository, and you're all set — CodeRabbit is now integrated. - -> When a pull request is created targeting the master branch, CodeRabbit automatically initiates its review process. It analyzes the changes and generates a summary and walkthrough of the modifications. The specific feedback and analysis provided by CodeRabbit are determined by the options you've configured in your YAML file. - -Let's see a few examples of CodeRabbit's review comments from a specific pull request in one of the projects. - -This particular PR involved in changing the language model from LLaMA 2 to LLaMA 3, for testing purposes. These examples will showcase how CodeRabbit analyzed and commented on this significant model switch. - -## Sample PR Review Workflow using CodeRabbit - -CodeRabbit automatically generates a PR summary highlighting key changes. - -![CodeRabbit Summary](/img/integrations/summary-by-codeRabbit.png) +### Grant required permissions -This image shows CodeRabbit's review status for another pull request. It highlights that **12 actionable comments** were generated, and the review also includes additional comments on specific files, demonstrating CodeRabbit's comprehensive analysis of the code changes. +To give CodeRabbit access to one or more of your repositories, follow these steps: -![Actionable Comments By CodeRabbit](/img/integrations/actionable-comments-by-coderabbit.png) +1. Visit [the CodeRabbit web interface](https://app.coderabbit.ai/settings/repositories). -You can also use [CodeRabbit commands](https://docs.coderabbit.ai/guides/commands/) to chat with the AI code Reviewer. +1. Make sure that the correct GitHub organization for the repository is displayed + at the top of the web interface. To change the organization, click **Change + Organization** and select a different organization from the list. -![CodeRabbit Commands](/img/integrations/full-review.png) + If the repositories that you want to add are associated directly with your GitHub account, and not a separate organization, then select your account name as the organization. -CodeRabbit could generate a **code sequence diagram** when you request a full review. + If the organization containing the repository doesn't appear in the list, then you might + need to refresh the list of organizations that CodeRabbit has associated with your + GitHub account. For more information, see [Add organizations](/getting-started/adding-organizations). -The sequence diagram illustrates the precise flow of interactions between the objects in the system. +1. Click the **Add Repositories** button. Your browser navigates to GitHub.com. -![CodeRabbit Sequence Diagram](/img/integrations/coderabbit-sequence-diagram.png) + If the selected organization has no repositories registered with CodeRabbit, then your browser displays a CodeRabbit permissions dialog for setting up a new integration. Proceed to the next step. -Also, check out the response when asked for what improvements can be done on the code level. + Otherwise, your browser displays a GitHub settings page for your organization's existing CodeRabbit integration. Scroll down to the section titled **Repository access**, and then proceed to the next step. -![Code Improvements Suggested by CodeRabbit](/img/integrations/improvements.png) +1. Select which repositories you'd like to allow CodeRabbit to write code reviews for. -In addition to providing reviews and summaries, **CodeRabbit** can also detect configuration issues. + To give CodeRabbit access to all repositories in the organization, select **All repositories**. This also automatically grants CodeRabbit access to all repositories added to the organization in the future. -> For example, I accidentally set up both CodeRabbit Pro (The process we've been discussing) and the open-source version (Refer to [different config process](https://github.com/coderabbitai/ai-pr-reviewer?tab=readme-ov-file#install-instructions)) in my repository at the same time. + To give CodeRabbit access to specific, limited list of repositories, select **Only select repositories**, and then choose repositories from the list. -CodeRabbit automatically detects and alerts you about configuration conflicts. + :::note + You can change this setting later. + ::: -![Configuration Issues by CodeRabbit](/img/integrations/configuration.png) +1. Click the button at the bottom of the form, which has one of the following labels, depending upon context: -CodeRabbit generates detailed statistics and test plans for each pull request. + - **Install & Authorize**, if this organization has no repositories integrated with CodeRabbit, and you are an owner of this organization. + - **Save**, if this organization already has repositories integrated with CodeRabbit -![Statistics by CodeRabbit](/img/integrations/statistics.png) +1. If you are integrating an organization with CodeRabbit for the first time, then your browser navigates back to the CodeRabbit web interface. -![Test Plan by CodeRabbit](/img/integrations/test-plan.png) + Otherwise, your browser remains on your GitHub settings page, and you can manually navigate [back to the CodeRabbit web interface](https://app.coderabbit.ai/settings/repositories). -> 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) +## What's next -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. +- [Set your repository preferences](/guides/repository-settings) -> Explore, Experiment, Discover how [CodeRabbit](https://docs.coderabbit.ai/) can streamline your code review process using AI. +- [Review pull requests](/guides/code-review-overview) diff --git a/docs/platforms/gitlab-com.mdx b/docs/platforms/gitlab-com.mdx index c276cd35..30b23031 100644 --- a/docs/platforms/gitlab-com.mdx +++ b/docs/platforms/gitlab-com.mdx @@ -107,7 +107,13 @@ By default, GitLab restricts this option to users on the Premium or Ultimate tie 5. Ensure the following scopes are selected: `api`. 6. Ensure Developer Access is provided. ---- +:::tip + +Group Access Tokens create bot users with generic GitLab-generated usernames (like `group_63_bot_5753...`). If you prefer a more descriptive username for your CodeRabbit bot, you can customize it using the [GitLab API](https://docs.gitlab.com/api/users/#modify-a-user). + +You can find the bot's user ID through the CodeRabbit UI if connected, or by visiting the bot user's profile from your Group Members page in GitLab. + +::: ### Where to Provide CodeRabbit the Access Token diff --git a/docs/platforms/platforms.md b/docs/platforms/platforms.md index d4cb1748..67689490 100644 --- a/docs/platforms/platforms.md +++ b/docs/platforms/platforms.md @@ -1,35 +1,44 @@ --- -title: Integrate with Git platforms -description: Overview of CodeRabbit's supported Git platforms. +title: Add CodeRabbit to your repository +description: Conceptual overview of integrating CodeRabbit with your Git platform +sidebar_label: Overview --- -CodeRabbit supports various Git platforms to provide code review for your repositories. For the cloud-hosted Git platforms, you can [login][login] to CodeRabbit and add your repositories. The following platforms are supported: +This page presents an overview of integrating CodeRabbit with your Git platform. +For a conceptual overview of CodeRabbit, see [Introduction](/). -## GitHub +## Use CodeRabbit with Git platforms -| Host | Support | -| ------------------------ | ---------------------------------------- | -| GitHub.com | [Supported](github-com.md) | -| GitHub Enterprise Server | [Supported](github-enterprise-server.md) | +CodeRabbit integrates with the following Git platforms: -## GitLab +- [GitHub.com](/platforms/github-com) +- [GitHub Enterprise Server](/platforms/github-enterprise-server) +- [GitLab.com](/platforms/gitlab-com) +- [Self-managed GitLab](/platforms/self-hosted-gitlab) +- [Azure DevOps](/platforms/azure-devops) +- [BitBucket Cloud](/platforms/bitbucket-cloud) -| Host | Support | -| ------------------- | ---------------------------------- | -| GitLab.com | [Supported](gitlab-com.mdx) | -| GitLab Self Managed | [Supported](self-hosted-gitlab.md) | +The exact steps for each platform are outlined in the pages linked above. That said, integrating any +Git platform with CodeRabbit follows this general pattern: -## Azure DevOps +1. Log into CodeRabbit using your Git platform account. -| Host | Support | -| ------------ | ---------------------------- | -| Azure DevOps | [Supported](azure-devops.md) | +1. Add the organizations containing the repositories that you want CodeRabbit to work with. You generally need ownership-level permissions with these organizations. (Different Git platforms might call their organizations different + things, such as "groups" in GitLab and "workspaces" in BitBucket.) -## Bitbucket +1. Create a dedicated CodeRabbit service account on your Git platform, if needed. We handle + this step for you on some platforms, such as GitHub.com. -| Host | Support | -| -------------------- | ---------------------------------------- | -| Bitbucket Datacenter | [Supported](../self-hosted/bitbucket.md) | -| Bitbucket Cloud | [Supported](./bitbucket-cloud.md) | +1. Grant CodeRabbit the permissions that it needs to work with one or more + of the repositories that you have ownership-level access to. -[login]: https://app.coderabbit.ai/login?free-trial +After you finish integrating CodeRabbit with one or more repositories, you can [start using CodeRabbit immediately](/guides/code-review-overview) using its default configuration, which automatically reviews or summarizes new pull requests. You can also [customize CodeRabbit’s configuration](/guides/configuration-overview) to suit your team's needs. + +## What's next {#whats-next} + +- [Integrate CodeRabbit with GitHub.com](/platforms/github-com) +- [Integrate CodeRabbit with GitHub Enterprise Server](/platforms/github-enterprise-server) +- [Integrate CodeRabbit with GitLab.com](/platforms/gitlab-com) +- [Integrate CodeRabbit with Self-managed GitLab](/platforms/self-hosted-gitlab) +- [Integrate CodeRabbit with Azure DevOps](/platforms/azure-devops) +- [Integrate CodeRabbit with BitBucket Cloud](/platforms/bitbucket-cloud) diff --git a/docs/platforms/self-hosted-gitlab.md b/docs/platforms/self-hosted-gitlab.md index 3fa18a71..bd330887 100644 --- a/docs/platforms/self-hosted-gitlab.md +++ b/docs/platforms/self-hosted-gitlab.md @@ -71,6 +71,12 @@ After the user is created, you can retrieve the **User ID** from that user's profile and generate an [**access token**](#generating-personal-access-token). The access token is used to post reviews on merge requests. +:::note + +If you prefer, you can create a Group Access Token which will create a dedicated user on your behalf. For more information, see [Group Access Token](/docs/platforms/gitlab-com.mdx#group-access-token) + +::: + We recommend using the CodeRabbit [logo](/img/integrations/logo.png) as the profile picture to ensures easy recognition. #### **Creating OAuth2 application** diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index 5109ba5a..d95fbaa0 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -301,11 +301,11 @@ If enabled, then the reviews that CodeRabbit generates include assessments of ho 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 use the built-in issue management 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). +and [Let CodeRabbit read your issue tracker](https://docs.coderabbit.ai/guides/setup-best-practices#issues). #### Auto Apply Labels @@ -604,8 +604,8 @@ Set the commit status to 'pending' when the review is in progress and 'success' 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 +your repository for up to seven days after its most recent code review. This cache +lets CodeRabbit save time and effort in between subsequent 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 @@ -902,14 +902,14 @@ For more information, see [Speed up reviews by adding path filters](https://docs -Path instructions are additional sets of instructions, expressed in natural lanaguge, -that you provide to CodeRabbit for reveiwing certain files in your repository. +Path instructions are additional sets of instructions, expressed in natural language, +that you provide to CodeRabbit for reviewing certain files in your repository. -You associate each set of instuctions with a file path relative to the root +You associate each set of instructions 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: +and JavaScript files in a repository's `src` directory: @@ -919,17 +919,17 @@ and JavaScript files in a reposistory's `src` directory: ```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 + 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, +For further examples of path instructions specific to various programming languages, see [the `awesome-coderabbit` public repository](https://github.com/coderabbitai/awesome-coderabbit/tree/main/configs). #### Poem @@ -1398,7 +1398,7 @@ We recommend leaving this option enabled. A list of branches that CodeRabbit performs automatic code reviews on, other -than the reposiorty's main branch (usually `main` or `master`.) +than the repository'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. @@ -1976,6 +1976,100 @@ Specify the Jira project keys to use for the knowledge base. 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. +### Code guidelines + +You can define a list of paths that guide CodeRabbit to your organization's code guidelines. +If you do, then CodeRabbit applies these guidelines to its code reviews. For more +information, see [Code Guidelines](/integrations/knowledge-base#code_guidelines). + +#### Enable code guidelines + + + + + + + + + + + + + +
LocationKnowledge Base > Enabled
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.code_guidelines.enabled`
Datatypeboolean
Default`true`
+
+
+ +Enable CodeRabbit to enforce your organization's coding standards during reviews. + +#### File patterns + + + + + + + + + + + + + +
LocationKnowledge Base > File Patterns
Default_No patterns_
+
+ + + + + + + + + + + + + + + +
Field`knowledge_base.code_guidelines.filePatterns`
Datatypearray
Default`[]`
+
+
+ +A list of path specifications to your repository's coding guideline documents, relative +to the root of your repository. Fileglob matching is allowed. Paths are case-sensitive. + +If the code guidelines feature is enabled, then CodeRabbit applies code-guideline +documents found at the following paths, in addition to any paths that you define: + +- `**/.cursorrules` +- `.github/copilot-instructions.md` +- `**/CLAUDE.md` +- `**/GEMINI.md` +- `**/.cursor/rules/*` +- `**/.windsurfrules` +- `**/.clinerules/*` +- `**/.rules/*` +- `**/AGENT.md` + ### Linear #### Enable Linear @@ -2850,6 +2944,47 @@ ESLint is a static code analysis tool for JavaScript files. ESLint is a static code analysis tool for JavaScript files. +### Flake8 + +Flake8 is a static code analysis tool for Python files. + +#### Enable Flake8 + + + + + + + + + + + + + +
LocationReview > Tools > Flake8 > Enable
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.flake8.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +Flake8 is a static code analysis tool for Python files. + ### GitHub Checks GitHub Checks integration configuration. @@ -3511,11 +3646,11 @@ markdownlint-cli2 is a static analysis tool to enforce standards and consistency markdownlint-cli2 is a static analysis tool to enforce standards and consistency for Markdown files. -### OXC +### Oxlint -OXC is a JavaScript/TypeScript linter written in Rust. +Oxlint is a JavaScript/TypeScript linter for OXC written in Rust. -#### Enable OXC +#### Enable Oxlint @@ -3523,7 +3658,7 @@ OXC is a JavaScript/TypeScript linter written in Rust. Location - Review > Tools > Enable OXC + Review > Tools > Enable Oxlint Default @@ -3550,7 +3685,7 @@ OXC is a JavaScript/TypeScript linter written in Rust. -OXC is a JavaScript/TypeScript linter written in Rust. +Oxlint is a JavaScript/TypeScript linter for OXC written in Rust. ### PHPStan @@ -3708,6 +3843,88 @@ Enable PMD. Optional path to the PMD configuration file relative to the repository. +### PHPMD + +PHPMD is a static code analysis tool for PHP files. + +#### Enable PHPMD + + + + + + + + + + + + + +
LocationReview > Tools > Enable PHPMD
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.phpmd.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +PHPMD is a static code analysis tool for PHP files. + +### PHPCS + +PHPCS is a static code analysis and coding-standard checker for PHP (plus JS/CSS) files. + +#### Enable PHPCS + + + + + + + + + + + + + +
LocationReview > Tools > Enable PHPCS
Defaulttrue
+
+ + + + + + + + + + + + + + + +
Field`reviews.tools.phpcs.enabled`
Datatypeboolean
Defaulttrue
+
+
+ +PHPCS is a static code analysis tool for PHP, JavaScript and CSS files. + ### Prisma Schema Linting Configuration for Prisma Schema linting to ensure schema file quality diff --git a/docs/reference/review-commands.md b/docs/reference/review-commands.md index cb50b59c..dc3c97b8 100644 --- a/docs/reference/review-commands.md +++ b/docs/reference/review-commands.md @@ -29,11 +29,11 @@ CodeRabbit through chat, see [Interact with CodeRabbit reviews](/guides/code-rev ## 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 auto-generate unit tests` | Generates unit tests for the PR | When you need automatic unit testing for your code | -| `@coderabbitai configuration` | Shows current CodeRabbit settings | When you need to check or export your configuration | +| Command | Description | Use Case | +| ----------------------------------- | -------------------------------------------- | --------------------------------------------------- | +| `@coderabbitai generate docstrings` | Generates docstrings for functions in the PR | When you need automatic documentation for your code | +| `@coderabbitai generate unit tests` | Generates unit tests for the PR | When you need automatic unit testing for your code | +| `@coderabbitai configuration` | Shows current CodeRabbit settings | When you need to check or export your configuration | ## Agentic chat commands diff --git a/docs/reference/yaml-template.md b/docs/reference/yaml-template.md index cb9e8473..99fafa34 100644 --- a/docs/reference/yaml-template.md +++ b/docs/reference/yaml-template.md @@ -31,6 +31,7 @@ reviews: collapse_walkthrough: false changed_files_summary: true sequence_diagrams: true + estimate_code_review_effort: true assess_linked_issues: true related_issues: true related_prs: true @@ -107,6 +108,8 @@ reviews: config_file: "" eslint: enabled: true + flake8: + enabled: true rubocop: enabled: true buf: @@ -118,6 +121,10 @@ reviews: pmd: enabled: true config_file: "" + phpmd: + enabled: true + phpcs: + enabled: true cppcheck: enabled: true semgrep: @@ -145,7 +152,6 @@ reviews: enabled: true htmlhint: enabled: true - config_file: "" checkmake: enabled: true chat: diff --git a/docs/self-hosted/azure-devops.md b/docs/self-hosted/azure-devops.md index a843e1a7..c7b7f21b 100644 --- a/docs/self-hosted/azure-devops.md +++ b/docs/self-hosted/azure-devops.md @@ -103,6 +103,9 @@ LLM_TIMEOUT=360000 AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_REGION= +# optionally, use cross-region inference to access models in other regions +# if this is set to `true`, CodeRabbit will access models from `us`, `eu`, or `ap` regions based on the AWS_REGION value. +AWS_USE_CROSS_REGION_INFERENCE=[] TEMP_PATH=/cache @@ -115,10 +118,19 @@ CODERABBIT_LICENSE_KEY= CODERABBIT_API_KEY= ENABLE_METRICS=[true] -ENABLE_LEARNINGS=[true] -# if using CodeRabbit's learnings, also provide the following -# for example, s3://bucket/path/to/database, gs://bucket/path/to/database, etc. -OBJECT_STORE_URI=[] + +# CodeRabbit - KNOWLEDGE BASE +# +# Requisite: To enable CodeRabbit's knowledge base, you need to provide an object store URI. +OBJECT_STORE_URI=[] # All major object stores are supported e.g., s3://bucket/path/to/database, gs://bucket/path/to/database, etc. + +ENABLE_KNOWLEDGE_BASE=[true] # Global feature flag to enable/disable all knowledge base features. + +ENABLE_PRS_INDEX=[true] # Feature flag to enable/disable PRs indexing. +ENABLE_ISSUES_INDEX=[true] # Feature flag to enable/disable Issues indexing. +ENABLE_LEARNING_INDEX=[true] # Feature flag to enable/disable Learning indexing. +ENABLE_CODE_GUIDELINES_INDEX=[true] # Feature flag to enable/disable Code Guidelines indexing. +ENABLE_CODE_INDEX=[true] # Feature flag to enable/disable Code indexing. JIRA_HOST=[] JIRA_PAT=[] @@ -127,6 +139,8 @@ LINEAR_PAT=[] ENABLE_WEB_SEARCH=[true] PERPLEXITY_API_KEY=[] + +YAML_CONFIG=[] ``` :::note @@ -134,6 +148,7 @@ PERPLEXITY_API_KEY=[] - If you are using Azure OpenAI, verify that the model deployment names are in the .env file. - Values marked with [] are not optional to provide. - You can generate `CODERABBIT_API_KEY` from CodeRabbit UI -> Organizations Settings -> API Keys. +- `YAML_CONFIG` is an optional configuration file that can be used to customize CodeRabbit's behavior at the deployment level. It takes the same format as the [CodeRabbit YAML configuration](/docs/getting-started/configure-coderabbit.md) file. It requires the entire YAML file to be in an escaped string format, for example, `YAML_CONFIG="key1: value1\nkey2: value2"`. You can use [Escape YAML](https://escapeyaml.dev/) to generate the escaped string. ::: diff --git a/docs/self-hosted/bitbucket.md b/docs/self-hosted/bitbucket.md index 7e7faf2b..9d20ec39 100644 --- a/docs/self-hosted/bitbucket.md +++ b/docs/self-hosted/bitbucket.md @@ -95,6 +95,9 @@ LLM_TIMEOUT=360000 AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_REGION= +# optionally, use cross-region inference to access models in other regions +# if this is set to `true`, CodeRabbit will access models from `us`, `eu`, or `ap` regions based on the AWS_REGION value. +AWS_USE_CROSS_REGION_INFERENCE=[] # System Configuration TEMP_PATH=/cache @@ -110,10 +113,20 @@ CODERABBIT_LICENSE_KEY= CODERABBIT_API_KEY= ENABLE_METRICS=[true] -ENABLE_LEARNINGS=[true] -# if using CodeRabbit's learnings, also provide the following -# for example, s3://bucket/path/to/database, gs://bucket/path/to/database, etc. -OBJECT_STORE_URI=[] + + +# CodeRabbit - KNOWLEDGE BASE +# +# Requisite: To enable CodeRabbit's knowledge base, you need to provide an object store URI. +OBJECT_STORE_URI=[] # All major object stores are supported e.g., s3://bucket/path/to/database, gs://bucket/path/to/database, etc. + +ENABLE_KNOWLEDGE_BASE=[true] # Global feature flag to enable/disable all knowledge base features. + +ENABLE_PRS_INDEX=[true] # Feature flag to enable/disable PRs indexing. +ENABLE_ISSUES_INDEX=[true] # Feature flag to enable/disable Issues indexing. +ENABLE_LEARNING_INDEX=[true] # Feature flag to enable/disable Learning indexing. +ENABLE_CODE_GUIDELINES_INDEX=[true] # Feature flag to enable/disable Code Guidelines indexing. +ENABLE_CODE_INDEX=[true] # Feature flag to enable/disable Code indexing. JIRA_HOST=[] JIRA_PAT=[] @@ -122,6 +135,8 @@ LINEAR_PAT=[] ENABLE_WEB_SEARCH=[true] PERPLEXITY_API_KEY=[] + +YAML_CONFIG=[] ``` :::note @@ -129,6 +144,7 @@ PERPLEXITY_API_KEY=[] - If you are using Azure OpenAI, verify that the model deployment names are in the .env file. Values marked with [] are optional and can be omitted if the feature is not needed. - You can generate `CODERABBIT_API_KEY` from CodeRabbit UI -> Organizations Settings -> API Keys. +- `YAML_CONFIG` is an optional configuration file that can be used to customize CodeRabbit's behavior at the deployment level. It takes the same format as the [CodeRabbit YAML configuration](/docs/getting-started/configure-coderabbit.md) file. It requires the entire YAML file to be in an escaped string format, for example, `YAML_CONFIG="key1: value1\nkey2: value2"`. You can use [Escape YAML](https://escapeyaml.dev/) to generate the escaped string. ::: @@ -141,18 +157,18 @@ cat coderabbit.json | docker login -u _json_key --password-stdin us-docker.pkg.d docker pull us-docker.pkg.dev/coderabbitprod/self-hosted/coderabbit-agent:latest ``` -### Verify the image is up +## Host the image -You can query `/health` endpoint to verify that the `coderabbit-agent` service is up and running. +You can host the image on a server, serverless function, or container environment and expose port `8080`. Run the Docker image with the equivalent command on your chosen platform, ensuring you replace the `.env` file path with the path to your actual `.env` file: ```bash -curl 127.0.0.1:8080/health +docker run --env-file .env --publish 127.0.0.1:8080:8080 us-docker.pkg.dev/coderabbitprod/self-hosted/coderabbit-agent:latest ``` -## Host the image +### Verify the image is up -You can host the image on a server, serverless function, or container environment and expose port `8080`. Run the Docker image with the equivalent command on your chosen platform, ensuring you replace the `.env` file path with the path to your actual `.env` file: +You can query `/health` endpoint to verify that the `coderabbit-agent` service is up and running. ```bash -docker run --env-file .env --publish 127.0.0.1:8080:8080 us-docker.pkg.dev/coderabbitprod/self-hosted/coderabbit-agent:latest +curl 127.0.0.1:8080/health ``` diff --git a/docs/self-hosted/github.md b/docs/self-hosted/github.md index 3031e45c..accdb8a2 100644 --- a/docs/self-hosted/github.md +++ b/docs/self-hosted/github.md @@ -106,6 +106,9 @@ LLM_TIMEOUT=360000 AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_REGION= +# optionally, use cross-region inference to access models in other regions +# if this is set to `true`, CodeRabbit will access models from `us`, `eu`, or `ap` regions based on the AWS_REGION value. +AWS_USE_CROSS_REGION_INFERENCE=[] # if using Anthropic LLM_PROVIDER=anthropic @@ -128,10 +131,20 @@ CODERABBIT_LICENSE_KEY= CODERABBIT_API_KEY= ENABLE_METRICS=[true] -ENABLE_LEARNINGS=[true] -# if using CodeRabbit's learnings, also provide the following -# for example, s3://bucket/path/to/database, gs://bucket/path/to/database, etc. -OBJECT_STORE_URI=[] + + +# CodeRabbit - KNOWLEDGE BASE +# +# Requisite: To enable CodeRabbit's knowledge base, you need to provide an object store URI. +OBJECT_STORE_URI=[] # All major object stores are supported e.g., s3://bucket/path/to/database, gs://bucket/path/to/database, etc. + +ENABLE_KNOWLEDGE_BASE=[true] # Global feature flag to enable/disable all knowledge base features. + +ENABLE_PRS_INDEX=[true] # Feature flag to enable/disable PRs indexing. +ENABLE_ISSUES_INDEX=[true] # Feature flag to enable/disable Issues indexing. +ENABLE_LEARNING_INDEX=[true] # Feature flag to enable/disable Learning indexing. +ENABLE_CODE_GUIDELINES_INDEX=[true] # Feature flag to enable/disable Code Guidelines indexing. +ENABLE_CODE_INDEX=[true] # Feature flag to enable/disable Code indexing. JIRA_HOST=[] JIRA_PAT=[] @@ -140,6 +153,8 @@ LINEAR_PAT=[] ENABLE_WEB_SEARCH=[true] PERPLEXITY_API_KEY=[] + +YAML_CONFIG=[] ``` :::note @@ -150,6 +165,7 @@ PERPLEXITY_API_KEY=[] - For `GITHUB_HOSTNAME`, use GitHub Enterprise server's hostname, for example, “github.acme-inc.com” - You can generate `CODERABBIT_API_KEY` from CodeRabbit UI -> Organizations Settings -> API Keys. - When `ENABLE_LEARNINGS` is set to `true`, CodeRabbit will use `CODERABBIT_API_KEY` to store learnings on our servers. +- `YAML_CONFIG` is an optional configuration file that can be used to customize CodeRabbit's behavior at the deployment level. It takes the same format as the [CodeRabbit YAML configuration](/docs/getting-started/configure-coderabbit.md) file. It requires the entire YAML file to be in an escaped string format, for example, `YAML_CONFIG="key1: value1\nkey2: value2"`. You can use [Escape YAML](https://escapeyaml.dev/) to generate the escaped string. ::: diff --git a/docs/self-hosted/gitlab.md b/docs/self-hosted/gitlab.md index cd35c19f..1e8121cf 100644 --- a/docs/self-hosted/gitlab.md +++ b/docs/self-hosted/gitlab.md @@ -37,13 +37,46 @@ Consult official CodeRabbitAI documentation for a detailed [guide](https://docs. 1. **Navigate to Add Webhook Page**: Go to the webhook configuration page in the desired GitLab project. 2. **Add Webhook URL**: Enter the URL pointing to the CodeRabbit service, followed by `/gitlab_webhooks` (e.g., `http://127.0.0.1:8080/gitlab_webhooks`). 3. **Generate and Save Secret Token**: Generate a secret token, add it to the webhook, and store it securely. This will be needed for the `.env` file as `GITLAB_WEBHOOK_SECRET` (you can use a single secret token for all projects). -4. Select triggers: +4. **Select triggers**: - Push events - Comments - Issues events - Merge request events +## Add Webhook Using a Script + +We have a convenient [script](/code/gitlab-webhook.sh) to help you add webhooks to a project or all projects under a group in a GitLab instance. + +```bash +# Make sure the script is executable: +chmod +x gitlab-webhook.sh +``` + +Example usage: + +```bash +# PAT example (header auto-detected) +export GITLAB_TOKEN="glpat-xxxxx" +./gitlab-add-webhook.sh \ + -h "gitlab.example.com" -u "http:///gitlab_webhooks" \ + -s "mySecret" -p 42 + +# PAT example (explicit header) +./gitlab-add-webhook.sh \ + -h "gitlab.example.com" -u "http:///gitlab_webhooks" \ + -s "mySecret" -g "mygroup/mysubgroup/myproject" \ + -t "glpat-xxxxx" \ + -A "PRIVATE-TOKEN" + +# OAuth token with explicit header +./gitlab-add-webhook.sh \ + -h "gitlab.example.com" -u "http:///gitlab_webhooks" \ + -s "mySecret" -g "company/backend" \ + -t "eyJhbGciOi..." \ + -A "Authorization: Bearer" +``` + ## Prepare a `.env` file Create a `.env` file with the following content: @@ -101,6 +134,9 @@ LLM_TIMEOUT=360000 AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_REGION= +# optionally, use cross-region inference to access models in other regions +# if this is set to `true`, CodeRabbit will access models from `us`, `eu`, or `ap` regions based on the AWS_REGION value. +AWS_USE_CROSS_REGION_INFERENCE=[] # if using Anthropic LLM_PROVIDER=anthropic @@ -122,10 +158,21 @@ CODERABBIT_LICENSE_KEY= CODERABBIT_API_KEY= ENABLE_METRICS=[true] -ENABLE_LEARNINGS=[true] -# if using CodeRabbit's learnings, also provide the following -# for example, s3://bucket/path/to/database, gs://bucket/path/to/database, etc. -OBJECT_STORE_URI=[] + + +# CodeRabbit - KNOWLEDGE BASE +# +# Requisite: To enable CodeRabbit's knowledge base, you need to provide an object store URI. +OBJECT_STORE_URI=[] # All major object stores are supported e.g., s3://bucket/path/to/database, gs://bucket/path/to/database, etc. + +ENABLE_KNOWLEDGE_BASE=[true] # Global feature flag to enable/disable all knowledge base features. + +ENABLE_PRS_INDEX=[true] # Feature flag to enable/disable PRs indexing. +ENABLE_ISSUES_INDEX=[true] # Feature flag to enable/disable Issues indexing. +ENABLE_LEARNING_INDEX=[true] # Feature flag to enable/disable Learning indexing. +ENABLE_CODE_GUIDELINES_INDEX=[true] # Feature flag to enable/disable Code Guidelines indexing. +ENABLE_CODE_INDEX=[true] # Feature flag to enable/disable Code indexing. + JIRA_HOST=[] JIRA_PAT=[] @@ -134,6 +181,8 @@ LINEAR_PAT=[] ENABLE_WEB_SEARCH=[true] PERPLEXITY_API_KEY=[] + +YAML_CONFIG=[] ``` :::note @@ -141,6 +190,7 @@ PERPLEXITY_API_KEY=[] - If you are using Azure OpenAI, verify that the model deployment names are in the .env file. - Values marked with [] are not optional to provide. - You can generate `CODERABBIT_API_KEY` from CodeRabbit UI -> Organizations Settings -> API Keys. +- `YAML_CONFIG` is an optional configuration file that can be used to customize CodeRabbit's behavior at the deployment level. It takes the same format as the [CodeRabbit YAML configuration](/docs/getting-started/configure-coderabbit.md) file. It requires the entire YAML file to be in an escaped string format, for example, `YAML_CONFIG="key1: value1\nkey2: value2"`. You can use [Escape YAML](https://escapeyaml.dev/) to generate the escaped string. ::: @@ -153,18 +203,18 @@ cat coderabbit.json | docker login -u _json_key --password-stdin us-docker.pkg.d docker pull /coderabbit-agent:latest ``` -### Verify the image is up +## Host the image -You can query `/health` endpoint to verify that the coderabbit-agent service is up and running. +You can host the image on a server, serverless function, or container environment and expose port `8080`. Run the Docker image with the equivalent command on your chosen platform, ensuring you replace the `.env` file path with the path to your actual `.env` file: ```bash -curl 127.0.0.1:8080/health +docker run --env-file .env --publish 127.0.0.1:8080:8080 /coderabbit-agent:latest ``` -## Host the image +### Verify the image is up -You can host the image on a server, serverless function, or container environment and expose port `8080`. Run the Docker image with the equivalent command on your chosen platform, ensuring you replace the `.env` file path with the path to your actual `.env` file: +You can query `/health` endpoint to verify that the coderabbit-agent service is up and running. ```bash -docker run --env-file .env --publish 127.0.0.1:8080:8080 /coderabbit-agent:latest +curl 127.0.0.1:8080/health ``` diff --git a/docs/tools/dotenv.md b/docs/tools/dotenv.md index cac2613f..a3a2dfd2 100644 --- a/docs/tools/dotenv.md +++ b/docs/tools/dotenv.md @@ -12,6 +12,15 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; [Dotenv Linter](https://github.com/dotenv-linter/dotenv-linter) is a lightning-fast linter for `.env` files. It helps ensure your environment files are consistent, typo-free, and follow best practices. +## Files + +Dotenv Linter will run on files with the following patterns: + +- `**/.env` +- `**/.env.*` + +We will not run against files that do not start with `.env` (e.g., `test.env`). However `.env.dev` or `.env.local` is fine. + :::note Dotenv Linter does not require configuration to run and automatically anlysises `.env` files. If no configuration file is found, it will use default settings. diff --git a/docs/tools/flake8.md b/docs/tools/flake8.md new file mode 100644 index 00000000..a1a18881 --- /dev/null +++ b/docs/tools/flake8.md @@ -0,0 +1,46 @@ +--- +title: Flake8 +sidebar_label: Flake8 +description: CodeRabbit's guide to Flake8. +--- + +```mdx-code-block +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; + + +``` + +[Flake8](https://flake8.pycqa.org/) is a Python linting utility that wraps PyFlakes, pycodestyle, and Mccabe to check your Python or Jupiter Notebook code for style and logical errors. + +## Supported Files + +Flake8 will run on files with the following extensions: + +- `*.py` +- `*.ipynb` (using nbqa) + +## Configuration + +Flake8 supports the following config files: + +- `.flake8` + +CodeRabbit will not run Flake8 if no config file is found. + +## Features + +Flake8 can detect many issues such as: + +- Style violations (PEP 8) +- Logical errors and unused imports +- Code complexity issues +- Syntax errors +- And many more + +## Links + +- [Flake8 Official Website](https://flake8.pycqa.org/) +- [Flake8 GitHub Repository](https://github.com/pycqa/flake8) +- [Flake8 Documentation](https://flake8.pycqa.org/en/latest/) +- [Flake8 Configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) +- [nbqa Documentation](https://github.com/nbQA-dev/nbQA) diff --git a/docs/tools/list.md b/docs/tools/list.md index bfe5e5ce..f81880a3 100644 --- a/docs/tools/list.md +++ b/docs/tools/list.md @@ -36,7 +36,8 @@ For an overview of how CodeRabbit uses these tools when generating code reviews, | Plaintext | [LanguageTool][LanguageTool] | Grammar and Spell Checking | | Java | [PMD][PMD] | Code Quality | | Protobuf | [Buf][Buf] | Code Quality | -| Python | [Ruff][Ruff], [Pylint][Pylint] | Code Quality | +| Python | [Ruff][Ruff], [Pylint][Pylint], [Flake8][Flake8] | Code Quality | +| Jupyter Notebooks | [Ruff][Ruff], [Pylint][Pylint], [Flake8][Flake8] | Code Quality | | Regal | [Regal][Regal] | Code Quality | | Ruby | [RuboCop][RuboCop], [Brakeman][Brakeman] | Code Quality, Code Security | | Rust | [Clippy][Clippy] | Code Quality | @@ -86,3 +87,4 @@ For an overview of how CodeRabbit uses these tools when generating code reviews, [Checkmake]: /tools/checkmake.md [PHPMD]: /tools/phpmd.md [PHPCS]: /tools/phpcs.md +[Flake8]: /tools/flake8.md diff --git a/docs/tools/phpcs.md b/docs/tools/phpcs.md index 390c620f..468e23dc 100644 --- a/docs/tools/phpcs.md +++ b/docs/tools/phpcs.md @@ -39,6 +39,15 @@ PHPCS supports many coding standards including: - **PEAR**: PEAR coding standard - **Zend**: Zend Framework coding standard +## Configuration + +PHPCS requires a configuration file to run. CodeRabbit will only run PHPCS if one of the following configuration files is found: + +- `phpcs.xml` - XML configuration file +- `phpcs.xml.dist` - Distributed XML configuration file + +CodeRabbit will not run PHPCS if no configuration file is found. + ## Links - [PHPCS GitHub Repository](https://github.com/squizlabs/PHP_CodeSniffer) diff --git a/docs/tools/phpmd.md b/docs/tools/phpmd.md index fb191a27..84df5b11 100644 --- a/docs/tools/phpmd.md +++ b/docs/tools/phpmd.md @@ -29,6 +29,13 @@ PHPMD can detect various code quality issues including: - **Unused Code Rules**: Detects unused variables, parameters, methods, and classes - **Size Rules**: Identifies overly complex methods and classes +### Review Mode Behavior + +CodeRabbit's review mode affects which PHPMD rules are applied: + +- **Chill Mode**: Only checks for unused code (`unusedcode` rule set) +- **Nitpick Mode**: Checks all rule sets including clean code, code size, controversial rules, design issues, naming conventions, and unused code (`cleancode,codesize,controversial,design,naming,unusedcode`) + ## Links - [PHPMD Official Website](https://phpmd.org/) diff --git a/docs/tools/pylint.md b/docs/tools/pylint.md index f6793106..6c45484d 100644 --- a/docs/tools/pylint.md +++ b/docs/tools/pylint.md @@ -10,13 +10,25 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; ``` -[Pylint](https://pylint.pycqa.org/) is a static code analysis tool for Python. It checks your Python code for errors, enforces a coding standard, and looks for code smells. +[Pylint](https://pylint.pycqa.org/) is a static code analysis tool for Python or Jupiter Notebooks. It checks your Python code for errors, enforces a coding standard, and looks for code smells. ## Supported Files Pylint will run on files with the following extensions: - `*.py` +- `.ipynb` (using nbqa) + +## Configuration + +Pylint supports the following config files: + +- `.pylintrc` +- `pylintrc` +- `.pylintrc.toml` +- `pylintrc.toml` + +CodeRabbit will not run Pylint if no config file is found. ## Features @@ -35,3 +47,4 @@ Pylint can detect many issues such as: - [Pylint GitHub Repository](https://github.com/pylint-dev/pylint) - [Pylint Documentation](https://pylint.pycqa.org/en/latest/) - [Message Control](https://pylint.pycqa.org/en/latest/user_guide/message-control.html) +- [nbqa Documentation](https://github.com/nbQA-dev/nbQA) diff --git a/docs/tools/ruff.md b/docs/tools/ruff.md index fe897d7b..97ebacde 100644 --- a/docs/tools/ruff.md +++ b/docs/tools/ruff.md @@ -10,13 +10,14 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; ``` -[Ruff](https://docs.astral.sh/ruff/) is a linter for Python. +[Ruff](https://docs.astral.sh/ruff/) is a linter for Python or Jupiter Notebooks. ## Files Ruff will run on files with the following extensions: - `.py` +- `.ipynb` (using nbqa) ## Configuration @@ -31,3 +32,4 @@ CodeRabbit will use the default settings based on the profile selected if no con ## Links - [Ruff Configuration](https://docs.astral.sh/ruff/configuration/) +- [nbqa Documentation](https://github.com/nbQA-dev/nbQA) diff --git a/docs/tools/shopify-cli.md b/docs/tools/shopify-cli.md index 934a6345..cc574723 100644 --- a/docs/tools/shopify-cli.md +++ b/docs/tools/shopify-cli.md @@ -12,6 +12,31 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; [Shopify CLI](https://github.com/Shopify/cli) is a command-line tool that helps you build Shopify apps, themes, and custom storefronts. It provides functionality for initializing, building, developing, and deploying Shopify projects. +## Requirements + +The tool only runs when the following conditions are met: + +### File Types + +- Only processes pull requests changing `*.liquid` files + +### Configuration Files + +- Requires either `.theme-check.yml` or `.theme-check.yaml` configuration file in the project root + +### Directory Structure + +- Requires the standard Shopify theme directory structure at the project root: + - `assets/` + - `config/` + - `layout/` + - `locales/` + - `sections/` + - `snippets/` + - `templates/` + +If any of these requirements are not met, the tool will not run. + ## Validation Rules The tool checks for: diff --git a/sidebars.ts b/sidebars.ts index 5b42e112..487a363b 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -85,6 +85,7 @@ const sidebars: SidebarsConfig = { "getting-started/configure-coderabbit", "guides/initial-configuration", "integrations/knowledge-base", + "guides/learnings", "guides/review-instructions", "tools/tools", "guides/roles", @@ -131,6 +132,7 @@ const sidebars: SidebarsConfig = { "guides/about-vscode", "guides/install-vscode", "guides/use-vscode", + "guides/use-vscode-selfhosted", "guides/config-vscode", "guides/uninstall-vscode", ], @@ -176,23 +178,32 @@ const sidebars: SidebarsConfig = { "tools/list", "tools/actionlint", "tools/biome", + "tools/brakeman", "tools/buf", + "tools/checkmake", "tools/checkov", "tools/circleci", + "tools/clippy", "tools/cppcheck", "tools/detekt", + "tools/dotenv", "tools/eslint", + "tools/flake8", "tools/gitleaks", "tools/golangci-lint", "tools/hadolint", + "tools/htmlhint", "tools/languagetool", "tools/luacheck", "tools/markdownlint", "tools/oxlint", + "tools/phpcs", + "tools/phpmd", "tools/phpstan", "tools/pipeline-remediation", "tools/pmd", "tools/prisma-lint", + "tools/pylint", "tools/regal", "tools/rubocop", "tools/ruff", diff --git a/src/css/custom.css b/src/css/custom.css index 933d51d0..7365089e 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -39,6 +39,8 @@ --ifm-navbar-height: 5rem; --ifm-font-family-base: "Poppins", "Work Sans", sans-serif; --ifm-background-color-primary: #f6f6f1; + --ifm-background-color-secondary: #e8e8e8; + --ifm-breadcrumb-item-background-active: #ffe9e2; } [data-theme="dark"] { @@ -51,6 +53,8 @@ --ifm-color-primary-lightest: #171717; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); --ifm-background-color-primary: #171717; + --ifm-background-color-secondary: #232323; + --ifm-breadcrumb-item-background-active: #3f322e; } #__docusaurus { @@ -102,6 +106,8 @@ a[docid="docs"] > svg { overflow: hidden; max-width: 100%; background: #000; + border-radius: 1rem; + border: 4px solid var(--ifm-background-color-secondary); } .video-container iframe { @@ -298,3 +304,34 @@ a[docid="docs"] > svg { .pagination-nav { display: none; } +/* ===== MARKDOWN STYLES ===== */ +.theme-doc-markdown.markdown { + line-height: 1.8rem; +} +/* ===== BREADCRUMB STYLES ===== */ + +.breadcrumbs { + display: flex; + gap: 0.5rem; + overflow-x: auto; + white-space: nowrap; +} +.breadcrumbs::-webkit-scrollbar { + display: none; +} +.breadcrumbs__item { + display: flex; + align-items: center; + white-space: nowrap; + gap: 1rem; +} +.breadcrumbs__link { + transition: color 0.2s ease; + background-color: var(--ifm-background-color-secondary); +} + +.breadcrumbs__item--active .breadcrumbs__link { + font-weight: 600; + cursor: default; + background-color: var(--ifm-breadcrumb-item-background-active); +} diff --git a/static/code/gitlab-webhook.sh b/static/code/gitlab-webhook.sh new file mode 100755 index 00000000..87c3be7d --- /dev/null +++ b/static/code/gitlab-webhook.sh @@ -0,0 +1,297 @@ +#!/usr/bin/env bash + +## gitlab-webhook.sh +# Add a webhook to one project, or every project in a subgroup tree. + +## Example usage: +# Make sure the script is executable: +# chmod +x gitlab-webhook.sh + +# PAT auto-detected header +# export GITLAB_TOKEN="glpat-xxxxx" +# ./gitlab-add-webhook.sh \ +# -h "gitlab.example.com" -u "https://ci.example.com/gitlab-hook" \ +# -s "mySecret" -p 42 + +# PAT with explicit header +# ./gitlab-add-webhook.sh \ +# -h "gitlab.example.com" -u "https://ci.example.com/gitlab-hook" \ +# -s "mySecret" -g "mygroup/mysubgroup/myproject" \ +# -t "glpat-qj5s..." \ +# -A "PRIVATE-TOKEN" + +# OAuth token with explicit header +# ./gitlab-add-webhook.sh \ +# -h "gitlab.example.com" -u "https://ci.example.com/gitlab-hook" \ +# -s "mySecret" -g "company/backend" \ +# -t "eyJhbGciOi..." \ +# -A "Authorization: Bearer" + + +set -euo pipefail + +usage() { + cat < -u -s \\ + [-t ] [-A ] [-p | -g ] [-v] + +Required: + -h GitLab host (e.g. gitlab.example.com) + -u Webhook endpoint URL to receive POSTs + -s Webhook secret token (used for signature verification) + +Authentication (one of): + -t Access token (PAT, project, group or OAuth). If omitted, \$GITLAB_TOKEN is used + -A Auth header to use. Default detects: + PAT → "PRIVATE-TOKEN" + anything else → "Authorization: Bearer" + +Scope (choose one): + -p Project ID or full path (e.g. 42 or group/app) + -g Group ID or full path, recurse through all subgroups & projects + +Options: + -v Verbose output (show individual project IDs in final summary) +EOF + exit 1 +} + +HOST="" HOOK_URL="" HOOK_SECRET="" +TOKEN="${GITLAB_TOKEN:-}" AUTH_HEADER="" +PROJECT="" GROUP="" VERBOSE=false + +while getopts "h:u:s:t:A:p:g:v" opt; do + case "$opt" in + h) HOST=$OPTARG ;; + u) HOOK_URL=$OPTARG ;; + s) HOOK_SECRET=$OPTARG ;; + t) TOKEN=$OPTARG ;; + A) AUTH_HEADER=$OPTARG ;; + p) PROJECT=$OPTARG ;; + g) GROUP=$OPTARG ;; + v) VERBOSE=true ;; + *) usage ;; + esac +done + +# Mandatory checks +[[ -z $HOST || -z $HOOK_URL || -z $HOOK_SECRET ]] && usage +[[ -n $PROJECT && -n $GROUP ]] && usage +[[ -z $PROJECT && -z $GROUP ]] && usage + +# Token handling +if [[ -z $TOKEN ]]; then + echo "[ERROR] No access token provided. Use -t or set \$GITLAB_TOKEN" >&2 + exit 1 +fi + +# Choose header if not forced +if [[ -z $AUTH_HEADER ]]; then + if [[ $TOKEN == glpat-* || $TOKEN == "PAT-"* ]]; then + AUTH_HEADER="PRIVATE-TOKEN" + else + AUTH_HEADER="Authorization: Bearer" + fi +fi + +API="https://${HOST}/api/v4" +CURL_BASE=(curl -sSf --header "${AUTH_HEADER}: ${TOKEN}") + +# Track processed projects to avoid duplicates +declare -A PROCESSED_PROJECTS +# Track projects where webhooks were successfully added +WEBHOOK_PROJECTS=() +# Track projects where webhooks already existed +EXISTING_WEBHOOK_PROJECTS=() +# Progress counters +TOTAL_PROJECTS_FOUND=0 +PROJECTS_PROCESSED=0 + +############################################################################## +# Helpers +############################################################################## +url_encode() { + local string="$1" + # URL encode the string using printf and sed + printf '%s' "$string" | sed 's/\//%2F/g; s/ /%20/g; s/@/%40/g; s/:/%3A/g; s/#/%23/g; s/?/%3F/g; s/&/%26/g; s/=/%3D/g; s/+/%2B/g' +} + +# Function to handle paginated API calls +fetch_paginated() { + local url=$1 + local page=1 + local per_page=100 + + while true; do + local paginated_url="${url}?per_page=${per_page}&page=${page}" + + # Add existing query params if they exist + if [[ "$url" == *"?"* ]]; then + paginated_url="${url}&per_page=${per_page}&page=${page}" + fi + + local response + response=$("${CURL_BASE[@]}" "$paginated_url" 2>/dev/null) || { + echo "[ERROR] Failed to fetch page $page from $url" >&2 + return 1 + } + + # Check if response is empty array or null + if [[ "$response" == "[]" || "$response" == "null" ]]; then + break + fi + + # Extract results from current page + local page_results + page_results=$(echo "$response" | jq -r '.[].id' 2>/dev/null) || { + echo "[ERROR] Failed to parse JSON response from page $page" >&2 + return 1 + } + + # If no results on this page, we're done + if [[ -z "$page_results" ]]; then + break + fi + + # Count projects found and show progress + local page_count + page_count=$(echo "$page_results" | wc -l) + TOTAL_PROJECTS_FOUND=$((TOTAL_PROJECTS_FOUND + page_count)) + echo "[PROGRESS] Found $page_count projects on page $page (total: $TOTAL_PROJECTS_FOUND)" >&2 + + # Output page results + echo "$page_results" + + # If we got less than per_page results, we're on the last page + local item_count + item_count=$(echo "$response" | jq '. | length' 2>/dev/null) || 0 + if [[ "$item_count" -lt "$per_page" ]]; then + break + fi + + ((page++)) + done +} + +create_hook() { + local pid=$1 + + # Skip if already processed + if [[ -n "${PROCESSED_PROJECTS[$pid]:-}" ]]; then + return 0 + fi + + # Mark as processed + PROCESSED_PROJECTS[$pid]=1 + PROJECTS_PROCESSED=$((PROJECTS_PROCESSED + 1)) + + local encoded_pid + # URL encode if pid is not purely numeric + if [[ $pid =~ ^[0-9]+$ ]]; then + encoded_pid=$pid + else + encoded_pid=$(url_encode "$pid") + fi + + # Check if webhook already exists + local existing_webhooks + existing_webhooks=$("${CURL_BASE[@]}" "${API}/projects/${encoded_pid}/hooks" 2>/dev/null) || { + echo "[ERROR] Failed to fetch existing webhooks for project $pid" >&2 + return 1 + } + + # Check if our webhook URL already exists + if echo "$existing_webhooks" | jq -e --arg url "$HOOK_URL" '.[] | select(.url == $url)' >/dev/null 2>&1; then + [[ "$VERBOSE" == "true" ]] && echo "[INFO] Webhook already exists for project: $pid" >&2 + EXISTING_WEBHOOK_PROJECTS+=("$pid") + return 0 + fi + + [[ "$VERBOSE" == "true" ]] && echo "[INFO] Adding webhook to project: $pid" >&2 + + "${CURL_BASE[@]}" --request POST \ + --data-urlencode "url=${HOOK_URL}" \ + --data "token=${HOOK_SECRET}" \ + --data "push_events=true" \ + --data "note_events=true" \ + --data "issues_events=true" \ + --data "merge_requests_events=true" \ + --data "enable_ssl_verification=true" \ + "${API}/projects/${encoded_pid}/hooks" \ + >/dev/null + + # Track successful webhook creation + WEBHOOK_PROJECTS+=("$pid") +} + +traverse_group() { + local gid=$1 + local encoded_gid + # URL encode if gid is not purely numeric + if [[ $gid =~ ^[0-9]+$ ]]; then + encoded_gid=$gid + else + encoded_gid=$(url_encode "$gid") + fi + + # projects (includes nested sub-groups) - with pagination + while IFS= read -r pid; do + [[ -n "$pid" ]] && create_hook "$pid" + done < <( + fetch_paginated "${API}/groups/${encoded_gid}/projects?include_subgroups=true" + ) + + # recurse explicit subgroups (older GitLab) - with pagination + while IFS= read -r sg; do + [[ -n "$sg" ]] && traverse_group "$sg" + done < <( + fetch_paginated "${API}/groups/${encoded_gid}/subgroups" + ) +} + +############################################################################## +# Main +############################################################################## +echo "[INFO] Starting webhook processing..." >&2 + +if [[ -n $PROJECT ]]; then + echo "[INFO] Processing single project: $PROJECT" >&2 + create_hook "$PROJECT" +else + echo "[INFO] Processing group and subgroups: $GROUP" >&2 + traverse_group "$GROUP" +fi + +echo "[INFO] Finished processing all projects" >&2 + +# Print final summary +total_projects=$((${#WEBHOOK_PROJECTS[@]} + ${#EXISTING_WEBHOOK_PROJECTS[@]})) + +if [[ $total_projects -eq 0 ]]; then + echo "[INFO] No projects were processed" +else + if [[ ${#WEBHOOK_PROJECTS[@]} -gt 0 ]]; then + if [[ "$VERBOSE" == "true" ]]; then + echo "[INFO] Webhooks installed successfully on ${#WEBHOOK_PROJECTS[@]} project(s):" + for pid in "${WEBHOOK_PROJECTS[@]}"; do + echo " - Project ID: $pid" + done + else + echo "[INFO] Webhooks installed successfully on ${#WEBHOOK_PROJECTS[@]} project(s)" + fi + fi + + if [[ ${#EXISTING_WEBHOOK_PROJECTS[@]} -gt 0 ]]; then + if [[ "$VERBOSE" == "true" ]]; then + echo "[INFO] Webhooks already existed on ${#EXISTING_WEBHOOK_PROJECTS[@]} project(s):" + for pid in "${EXISTING_WEBHOOK_PROJECTS[@]}"; do + echo " - Project ID: $pid" + done + else + echo "[INFO] Webhooks already existed on ${#EXISTING_WEBHOOK_PROJECTS[@]} project(s)" + fi + fi + + echo "[INFO] Total projects processed: $total_projects" +fi diff --git a/static/img/finishing-touches/utg.gif b/static/img/finishing-touches/utg.gif new file mode 100644 index 00000000..4d685239 Binary files /dev/null and b/static/img/finishing-touches/utg.gif differ diff --git a/static/img/guides/score-card-report-result.png b/static/img/guides/score-card-report-result.png new file mode 100644 index 00000000..15b51539 Binary files /dev/null and b/static/img/guides/score-card-report-result.png differ diff --git a/static/img/guides/score-card-result-comment.png b/static/img/guides/score-card-result-comment.png new file mode 100644 index 00000000..1ea43248 Binary files /dev/null and b/static/img/guides/score-card-result-comment.png differ diff --git a/static/img/guides/score-card-trigger-comment.png b/static/img/guides/score-card-trigger-comment.png new file mode 100644 index 00000000..2f690948 Binary files /dev/null and b/static/img/guides/score-card-trigger-comment.png differ diff --git a/static/img/guides/where-score-report-prompt-go.png b/static/img/guides/where-score-report-prompt-go.png new file mode 100644 index 00000000..3b26a1f1 Binary files /dev/null and b/static/img/guides/where-score-report-prompt-go.png differ diff --git a/static/schema/schema.v2.json b/static/schema/schema.v2.json index befdd2a7..b31867ae 100644 --- a/static/schema/schema.v2.json +++ b/static/schema/schema.v2.json @@ -195,6 +195,11 @@ "default": true, "description": "Generate sequence diagrams in the walkthrough." }, + "estimate_code_review_effort": { + "type": "boolean", + "default": true, + "description": "Estimate the code review effort in the walkthrough." + }, "assess_linked_issues": { "type": "boolean", "default": true, @@ -322,7 +327,7 @@ "type": "string" }, "default": [], - "description": "Restrict automatic reviews to only those pull requests that match one of the specified labels." + "description": "List of labels to control which PRs/MRs to review. Labels starting with '!' are negative matches. Examples: ['bug', 'feature'] - reviews PRs with 'bug' OR 'feature' label. ['!wip'] - reviews all PRs except those with 'wip' label. ['bug', '!wip'] - reviews PRs with 'bug' label but not if they have 'wip' label." }, "drafts": { "type": "boolean", @@ -374,6 +379,81 @@ "additionalProperties": false, "default": {} }, + "pre_merge_checks": { + "type": "object", + "properties": { + "docstrings": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": ["off", "warning", "error"], + "default": "warning", + "description": "Mode | Level of enforcement for docstring coverage check. Warning only generates a warning and does not require the user to resolve the check. While error requires the user to resolve issues before merging pull request." + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 100, + "default": 80, + "description": "Percentage threshold for docstring coverage check." + } + }, + "additionalProperties": false, + "default": {}, + "description": "Docstring Coverage | Checks if the code has sufficient docstrings." + }, + "title": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": ["off", "warning", "error"], + "default": "warning", + "description": "Mode | Level of enforcement for pull request title check. Warning only generates a warning and does not require the user to resolve the check. While error requires the user to resolve issues before merging pull request." + }, + "requirements": { + "type": "string", + "default": "", + "description": "Requirements | Requirements for the pull request title. Example: 'Title should be concise and descriptive, ideally under 50 characters.'" + } + }, + "additionalProperties": false, + "default": {}, + "description": "Title Check | Checks if the pull request title is appropriate and follows best practices." + }, + "description": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": ["off", "warning", "error"], + "default": "warning", + "description": "Mode | Level of enforcement for pull request description check. Warning only generates a warning and does not require the user to resolve the check. While error requires the user to resolve issues before merging pull request." + } + }, + "additionalProperties": false, + "default": {}, + "description": "Description Check | Checks if the pull request description is appropriate and follows best practices." + }, + "issue_assessment": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": ["off", "warning", "error"], + "default": "warning", + "description": "Mode | Level of enforcement for linked issue assessment. Warning only generates a warning and does not require the user to resolve the check. While error requires the user to resolve issues before merging pull request." + } + }, + "additionalProperties": false, + "default": {}, + "description": "Linked Issue Assessment | Checks if the pull request addresses the linked issues. Generate an assessment of how well the changes address the linked issues." + } + }, + "additionalProperties": false, + "default": {} + }, "tools": { "type": "object", "properties": { @@ -412,7 +492,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.38.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.6" }, "shellcheck": { "type": "object", @@ -433,7 +513,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Ruff | Ruff is a Python linter and code formatter. | Enable Ruff integration. | v0.11.9" + "description": "Enable Ruff | Ruff is a Python linter and code formatter. | Enable Ruff integration. | v0.12.2" } }, "additionalProperties": false, @@ -466,7 +546,7 @@ "maximum": 900000, "minimum": 0, "default": 90000, - "description": "Time in milliseconds to wait for all GitHub Checks to conclude." + "description": "Time in milliseconds to wait for all GitHub Checks to conclude. Default 90 seconds, max 15 minutes (900000ms)." } }, "additionalProperties": false, @@ -535,7 +615,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Biome | Biome is a fast formatter, linter, and analyzer for web projects. | Enable Biome integration. | v1.9.4" + "description": "Enable Biome | Biome is a fast formatter, linter, and analyzer for web projects. | Enable Biome integration. | v2.1.2" } }, "additionalProperties": false, @@ -578,7 +658,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.1.15" + "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.17" }, "level": { "type": "string", @@ -636,7 +716,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable golangci-lint | golangci-lint is a fast linters runner for Go. | Enable golangci-lint integration. | v1.64.8" + "description": "Enable golangci-lint | golangci-lint is a fast linters runner for Go. | Enable golangci-lint integration. | v2.2.2" }, "config_file": { "type": "string", @@ -666,7 +746,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Gitleaks | Gitleaks is a secret scanner. | Enable Gitleaks integration. | v8.26.0" + "description": "Enable Gitleaks | Gitleaks is a secret scanner. | Enable Gitleaks integration. | v8.27.2" } }, "additionalProperties": false, @@ -735,7 +815,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable RuboCop | RuboCop is a Ruby static code analyzer (a.k.a. linter ) and code formatter. | v1.75.5" + "description": "Enable RuboCop | RuboCop is a Ruby static code analyzer (a.k.a. linter ) and code formatter. | v1.76.1" } }, "additionalProperties": false, @@ -748,7 +828,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Buf | Buf offers linting for Protobuf files. | v1.54.0" + "description": "Enable Buf | Buf offers linting for Protobuf files. | v1.55.1" } }, "additionalProperties": false, @@ -761,7 +841,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Regal | Regal is a linter and language server for Rego. | v0.33.1" + "description": "Enable Regal | Regal is a linter and language server for Rego. | v0.35.1" } }, "additionalProperties": false, @@ -787,7 +867,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable PMD | PMD is an extensible multilanguage static code analyzer. It’s mainly concerned with Java. | v7.13.0" + "description": "Enable PMD | PMD is an extensible multilanguage static code analyzer. It’s mainly concerned with Java. | v7.15.0" }, "config_file": { "type": "string", @@ -817,7 +897,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.122.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.128.1" }, "config_file": { "type": "string", @@ -834,7 +914,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable CircleCI | CircleCI tool is a static checker for CircleCI config files. | v0.1.31687" + "description": "Enable CircleCI | CircleCI tool is a static checker for CircleCI config files. | v0.1.32638" } }, "additionalProperties": false, @@ -860,7 +940,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable SQLFluff | SQLFluff is an open source, dialect-flexible and configurable SQL linter. | v3.4.0" + "description": "Enable SQLFluff | SQLFluff is an open source, dialect-flexible and configurable SQL linter. | v3.4.1" } }, "additionalProperties": false, @@ -873,7 +953,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Prisma Schema linting | Prisma Schema linting helps maintain consistent and error-free schema files | v0.10.1" + "description": "Enable Prisma Schema linting | Prisma Schema linting helps maintain consistent and error-free schema files | v0.10.2" } }, "additionalProperties": false, @@ -899,12 +979,12 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable OXC | OXC is a JavaScript/TypeScript linter written in Rust. | v0.16.10" + "description": "Enable Oxlint | Oxlint is a JavaScript/TypeScript linter for OXC written in Rust. | v0.16.10" } }, "additionalProperties": false, "default": {}, - "description": "OXC is a JavaScript/TypeScript linter written in Rust." + "description": "Oxlint is a JavaScript/TypeScript linter for OXC written in Rust." }, "shopifyThemeCheck": { "type": "object", @@ -1065,7 +1145,7 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enabled | Enable CodeRabbit to enforce your organisation's coding standards during reviews." + "description": "Enabled | Enable CodeRabbit to enforce your organization's coding standards during reviews." }, "filePatterns": { "type": "array", @@ -1078,7 +1158,7 @@ }, "additionalProperties": false, "default": {}, - "description": "CodeRabbit will analyse and learn from your organisation's code guidelines, which you can mention in the file patterns section. These guidelines will then be used to conduct thorough code reviews." + "description": "CodeRabbit will analyse and learn from your organization's code guidelines, which you can mention in the file patterns section. These guidelines will then be used to conduct thorough code reviews." }, "learnings": { "type": "object", diff --git a/tailwind.config.js b/tailwind.config.js index b24582d0..dd081f63 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -21,7 +21,7 @@ module.exports = { preflight: false, // disable Tailwind's reset }, content: ["./src/**/*.{js,jsx,ts,tsx}", "../docs/**/*.mdx"], // my markdown stuff is in ../docs, not /src - darkMode: ["class", '[data-theme="dark"]'], // hooks into docusaurus' dark mode settigns + darkMode: ["class", '[data-theme="dark"]'], // hooks into docusaurus' dark mode settings theme: { fontFamily: { figtree: ["Figtree", "sans-serif"], pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy