Skip to content

Commit fde0147

Browse files
Merge branch 'main' into feature/issue/160
2 parents d1050e6 + 0c4b580 commit fde0147

File tree

11 files changed

+232
-34
lines changed

11 files changed

+232
-34
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,25 @@ Welcome to the official docs for [**CodeRabbit**](https://coderabbit.ai), the co
3737

3838
## Getting Started
3939

40-
1. Clone this repository:
40+
1. Make sure that you have the following prerequisites installed:
41+
42+
- [Node.js](https://nodejs.org/)
43+
- [pnpm](https://pnpm.io/installation)
44+
45+
2. Clone this repository:
4146

4247
```sh
4348
git clone https://github.com/coderabbit-ai/coderabbit-docs.git
4449
cd coderabbit-docs
4550
```
4651

47-
2. Install dependencies:
52+
3. Install Node.js dependencies using `pnpm`:
4853

4954
```sh
5055
pnpm install
5156
```
5257

53-
3. Start the development server:
58+
4. Start the development server:
5459

5560
```sh
5661
pnpm start

docs/changelog.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ description: The latest updates and changes to CodeRabbit.
55
sidebar_position: 13
66
---
77

8-
### May 30, 2025
8+
## June 5, 2025
99

10-
#### New Static Analysis Tool
10+
### Enhanced Static Analysis: Dotenv Linter and Pylint Support
1111

12-
We're excited to announce that [Pylint](https://github.com/PyCQA/pylint) is now supported on CodeRabbit!
12+
We're excited to announce that two new static analysis tools are now supported on CodeRabbit!
1313

14-
- **Pylint**: A widely used static analysis and code quality tool for Python. It checks for errors, enforces a coding standard, and looks for code smells in your Python codebase by analyzing Python files.
14+
- [Dotenv Linter](https://github.com/dotenv-linter/dotenv-linter) is a fast, opinionated linter for `.env` files that helps prevent misconfigurations by detecting typos, invalid syntax, and duplicated keys.
15+
16+
- [Pylint](https://github.com/PyCQA/pylint) is a widely used static analysis and code quality tool for Python. It checks for errors, enforces coding standards, and looks for code smells in your Python codebase.
1517

1618
## May 25, 2025
1719

docs/finishing-touches/docstrings.md

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,36 +50,32 @@ code_generation:
5050
5151
These software forges are supported:
5252
53-
- [x] Azure DevOps
54-
- [ ] Bitbucket Cloud
55-
- [ ] Bitbucket Data Center
56-
- [x] GitHub
57-
- [x] GitLab
53+
- Azure DevOps
54+
- GitHub
55+
- GitLab
5856
5957
While Bitbucket is not officially supported, docstrings can still be generated. However, they will be posted in a comment under the pull request. Full support for Bitbucket is planned.
6058
6159
## Supported languages
6260
6361
These languages are supported:
6462
65-
- [x] Bash
66-
- [x] C
67-
- [x] C#
68-
- [x] C++
69-
- [x] Elixir
70-
- [x] Go
71-
- [ ] Haskell
72-
- [x] Java
73-
- [x] JavaScript
74-
- [x] Kotlin
75-
- [x] Lua
76-
- [x] Php
77-
- [x] Python
78-
- [x] React TypeScript
79-
- [x] Ruby
80-
- [x] Rust
81-
- [ ] Scala
82-
- [x] Swift
83-
- [x] TypeScript
63+
- Bash
64+
- C
65+
- C#
66+
- C++
67+
- Elixir
68+
- Go
69+
- Java
70+
- JavaScript
71+
- Kotlin
72+
- Lua
73+
- Php
74+
- Python
75+
- React TypeScript
76+
- Ruby
77+
- Rust
78+
- Swift
79+
- TypeScript
8480
8581
CodeRabbit uses `ast-grep` to parse the code. If you want a new language to be supported, please look into [Add New Language to ast-grep](https://ast-grep.github.io/contributing/add-lang.html#add-new-language-to-ast-grep) first.

docs/guides/code-review-best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Code review best practices
33
description: Best practices for managing CodeRabbit code reviews.
4-
sidebar_label: Best practices
4+
sidebar_label: Code reviews
55
---
66

77
This page lists best practices for performing code reviews with CodeRabbit.

docs/guides/setup-best-practices.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: "Setup and configuration best practices"
3+
description: Best practices for seting up CodeRabbit.
4+
sidebar_label: Setup and configuration
5+
---
6+
7+
This page contains our best-practice advice for setting up CodeRabbit, and then
8+
configuring its code review behavior.
9+
10+
## Setup best practices {#setup}
11+
12+
This section lists our recommendations for setting up CodeRabbit with your
13+
Git platform, and integrating CodeRabbit with other tools and services.
14+
15+
### Give CodeRabbit its own user account {#user}
16+
17+
CodeRabbit works best when it has a user account all to itself on your Git platform.
18+
Your team treats this account as a bot or service account—even on platforms that don't
19+
have a formal concept of separate service accounts, such as Bitbucket Cloud.
20+
21+
If you use GitHub, then CodeRabbit sets up a service account named `CoderabbitAI` for you as soon as you connect your GitHub organization to CodeRabbit. On other platforms, such as Bitbucket Cloud or Gitlab, you must set this account up yourself.
22+
23+
For platform-specific instructions about setting up this user, see
24+
[Integrate with Git platforms](/platforms/).
25+
26+
### Let CodeRabbit read your issue tracker {#issues}
27+
28+
CodeRabbit can report on whether the changes proposed by a pull request
29+
successfully address specific, ticketed issues referenced by that pull request.
30+
31+
For this to work, CodeRabbit needs read access to your team's issue management system.
32+
33+
If you use the built-in issue management of either GitHub or GitLab, then
34+
CodeRabbit issue integration works without any further setup.
35+
36+
If you use issue management systems external from your Git platform, then you need to
37+
take additional steps to integrate CodeRabbit with your team's issues.
38+
39+
These are the external issue management systems that CodeRabbit supports:
40+
41+
- Jira
42+
- Linear
43+
44+
For more information, see [Integrate issue tracking](/integrations/issue-integrations/).
45+
46+
### Set up basic reports for your team {#reports}
47+
48+
CodeRabbit has a flexible reporting feature that can help keep your whole team
49+
up-to-date about the latest changes to your repositories. We recommend setting
50+
up at least the following scheduled reports, using templates available
51+
through the CodeRabbit web interface:
52+
53+
- A daily standup report, grouped by contributor.
54+
- Regular release notes, grouped by repository.
55+
56+
For more information, see [Generate reports](/guides/reports-overview).
57+
58+
## Configuration best practices {#configuration}
59+
60+
This section lists our recommendations for configuring the way that CodeRabbit
61+
works with your individual repositories.
62+
63+
### Fine-tune reviews using YAML files {#yaml}
64+
65+
CodeRabbit gives you two ways to configure how it works with your team's repositories:
66+
67+
- The [Repositories](https://app.coderabbit.ai/settings/repositories) page of the
68+
Dashboard
69+
- A [`coderabbit.yaml` file](/getting-started/configure-coderabbit/) in your repository
70+
71+
The graphical UI of the Repositories page lets you set up your per-repository
72+
preferences more rapidly, and can help you get familiar with CodeRabbit configuration options.
73+
74+
Once you are ready to fine-tune the ways that CodeRabbit works with your repositories,
75+
we recommend adding a `coderabbit.yaml` file to each one. This file has several
76+
advantages over using only the Dashboard:
77+
78+
- It applies version control to your repository's CodeRabbit settings.
79+
- During code reviews, CodeRabbit loads the file along with rest of your repository. This means that you can include setting changes as part of a pull request, and CodeRabbit both analyzes and applies these settings during its review.
80+
- The file makes the repository's CodeRabbit settings transparent to all of the repository's contributors.
81+
82+
Repository-level settings defined by a `coderabbit.yaml` take precedence over the
83+
settings defined for that repository in the Dashboard.
84+
85+
For more information, see [Add a configuration file](/getting-started/configure-coderabbit/).
86+
87+
### Speed up reviews by adding path filters {#filters}
88+
89+
If your repository contains a lot of data or other content that CodeRabbit
90+
doesn't need for code review context, then you can include _path filters_ in
91+
your repository configuration. For example, a filter of `!dist/**` tells CodeRabbit
92+
to disregard everything in your reposistory's top-level `dist` directory when
93+
preparing a code review.
94+
95+
Reducing the number of contextual files that CodeRabbit needs to read and analyze
96+
when preparing a code review can help make its code reviews faster.
97+
98+
You can define path filters using the CodeRabbit
99+
web interface, or with [a configuration file](/getting-started/configure-coderabbit/).
100+
101+
### Trust the defaults {#defaults}
102+
103+
CodeRabbit gives you control over a number of its core code-review features, letting you deactivate them entirely for your repositories if needed. We have chosen the default settings to meet the needs of most organizations and situations, and recommend leaving these settings at their default values if possible:
104+
105+
- **Cache**: Keep [the cache](/reference/caching) enabled to let CodeRabbit temporarily remember details about your repository
106+
between reviews, which improves review speed.
107+
- **Tools**: By default, CodeRabbit is allowed to use all of the [open-source linters and analyzer
108+
tools](/tools) that are available to it during code reviews. This helps CodeRabbit keep its reviews broad and flexible.
109+
- **Knowledge base**: CodeRabbit [knowledge base](/integrations/knowledge-base/) features, including learnings and issue tracking, can require data retention. If your organization needs to meet stricter data-retention policies, then you can opt out of using these features.
110+
111+
You can configure your use of the above features using the CodeRabbit web interface, or [a configuration file](/getting-started/configure-coderabbit/).
112+
113+
### Write specific CI/CD error messages {#pipeline}
114+
115+
CodeRabbit can analyze the logs of continuous integration (CI) or continuous
116+
deployment (CD) tools in your pipeline. CodeRabbit can provide better remediation
117+
advice about CI/CD failures during code reviews if your tools' error messages
118+
are as specific as possible when reporting failures.
119+
120+
For CodeRabbit to provide the best advice, configure your CI/CD failure output to include the following information:
121+
122+
- File names associated with the failure.
123+
- Line numbers that identify where the failure occurred in those files.
124+
- An explanation of the failure, including relevant error codes or diffs.
125+
126+
[This pull request](https://github.com/ff14-advanced-market-search/temp-fe/pull/47/files) shows an example of expanding the context of a CI error,
127+
in this case including a diff to show why a code-formatter check failed.
128+
129+
---
130+
131+
## What's next {#whats-next}
132+
133+
- [Code review best practices](/guides/code-review-best-practices)

docs/platforms/bitbucket-cloud.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ To enable CodeRabbit to interact with your Bitbucket repositories, an app passwo
1919

2020
1. Create a new Bitbucket account specifically for CodeRabbit and treat it as a service account.
2121
2. Name the account "CodeRabbit".
22-
3. Generate an App Password to enable seamless integration between CodeRabbit and your Bitbucket repositories.
22+
3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this new account.
23+
4. Generate an App Password to enable seamless integration between CodeRabbit and your Bitbucket repositories.
2324

2425
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.
2526

docs/tools/dotenv.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Dotenv Linter
3+
sidebar_label: Dotenv Linter
4+
description: CodeRabbit's guide to Dotenv Linter.
5+
---
6+
7+
```mdx-code-block
8+
import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';
9+
10+
<ProPlanNotice />
11+
```
12+
13+
[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.
14+
15+
:::note
16+
17+
Dotenv Linter does not require configuration to run and automatically anlysises `.env` files. If no configuration file is found, it will use default settings.
18+
19+
:::
20+
21+
## Features
22+
23+
Dotenv Linter can detect:
24+
25+
- Key duplication
26+
- Missing values
27+
- Incorrect formatting
28+
- Invalid characters
29+
- And many more issues
30+
31+
## Links
32+
33+
- [Dotenv Linter GitHub Repository](https://github.com/dotenv-linter/dotenv-linter)

docs/tools/list.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ For an overview of how CodeRabbit uses these tools when generating code reviews,
1818
| Cppcheck | [Cppcheck][Cppcheck] | Code Quality |
1919
| CSS | [Biome][Biome] | Code Quality |
2020
| Docker | [Hadolint][Hadolint], [Checkov][Checkov] | Code Quality, Code Security |
21+
| Environment Files (.env) | [Dotenv Linter][DotenvLinter] | Code Quality |
2122
| GitHub Actions | [actionlint][actionlint], [Pipeline Remediation][Pipeline] | Code Quality, CI/CD Failure Remediation |
2223
| GitLab Pipelines | [Pipeline Remediation][Pipeline] | CI/CD Failure Remediation |
2324
| Go | [golangci-lint][golangci-lint] | Code Quality |
@@ -78,3 +79,4 @@ For an overview of how CodeRabbit uses these tools when generating code reviews,
7879
[Brakeman]: /tools/brakeman.md
7980
[Clippy]: /tools/clippy.md
8081
[Pylint]: /tools/pylint.md
82+
[DotenvLinter]: /tools/dotenv.md

sidebars.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ const sidebars: SidebarsConfig = {
8787
"guides/code-review-overview",
8888
"guides/commands",
8989
"guides/generate-improvements",
90-
"guides/code-review-best-practices",
9190
"guides/code-review-troubleshooting",
9291
"guides/agent_chat",
9392
{
@@ -135,6 +134,15 @@ const sidebars: SidebarsConfig = {
135134
"guides/custom-reports",
136135
],
137136
},
137+
{
138+
type: "category",
139+
collapsed: true,
140+
label: "Best practices",
141+
items: [
142+
"guides/setup-best-practices",
143+
"guides/code-review-best-practices",
144+
],
145+
},
138146
{
139147
type: "category",
140148
collapsed: true,

src/css/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,8 @@ a[docid="docs"] > svg {
293293
display: none;
294294
}
295295
}
296+
297+
/* Disable automatic next/previous pagination links */
298+
.pagination-nav {
299+
display: none;
300+
}

static/schema/schema.v2.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,19 @@
895895
"additionalProperties": false,
896896
"default": {},
897897
"description": "Brakeman is a static analysis security vulnerability scanner for Ruby on Rails applications. | v7.0.2"
898+
},
899+
"dotenvLint": {
900+
"type": "object",
901+
"properties": {
902+
"enabled": {
903+
"type": "boolean",
904+
"default": true,
905+
"description": "Enable dotenv-linter | dotenv-linter is a tool for checking and fixing .env files for problems and best practices | v3.3.0"
906+
}
907+
},
908+
"additionalProperties": false,
909+
"default": {},
910+
"description": "dotenv-linter is a tool for checking and fixing .env files for problems and best practices"
898911
}
899912
},
900913
"additionalProperties": false,

0 commit comments

Comments
 (0)