Skip to content

Commit f10468a

Browse files
Merge branch 'main' into feature/issues/331
2 parents af0cbde + b3ffa58 commit f10468a

17 files changed

+445
-77
lines changed

docs/changelog.md

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

8+
## July 3, 2025
9+
10+
### Enhanced Python Static Analysis: Flake8 Support
11+
12+
We're excited to announce enhanced Python static analysis capabilities with [Flake8](https://flake8.pycqa.org/) support!
13+
14+
[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.
15+
16+
See our [tools documentation](https://docs.coderabbit.ai/tools/) for more details.
17+
18+
## July 1, 2025
19+
20+
### Enhanced Code Guidelines Support
21+
22+
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.
23+
24+
**New supported patterns:**
25+
26+
- `**/.cursorrules` - Cursor IDE rules and preferences
27+
- `.github/copilot-instructions.md` - GitHub Copilot instructions
28+
- `**/CLAUDE.md` - Claude-specific coding guidelines
29+
- `**/.cursor/rules/*` - Cursor rules directory
30+
- `**/.windsurfrules` - Windsurf IDE rules
31+
- `**/.clinerules/*` - Cline IDE rules
32+
- `**/.rules/*` - General rules directory
33+
34+
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.
35+
36+
## June 27, 2025
37+
38+
### Enhanced PHP Static Analysis: PHPMD and PHPCS Support
39+
40+
We're excited to announce enhanced PHP static analysis capabilities with two powerful new tools!
41+
42+
- [PHPMD](https://phpmd.org/) (PHP Mess Detector) is a static analysis tool that detects potential problems in your PHP code such as possible bugs, suboptimal code, overcomplicated expressions, and unused parameters, variables, methods, and classes.
43+
44+
- [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) (PHP CodeSniffer) is a development tool that ensures your PHP code conforms to coding standards like PSR-1, PSR-2, PSR-12, and custom standards. It can automatically fix many coding standard violations.
45+
46+
See our [tools documentation](https://docs.coderabbit.ai/tools/) for more details.
47+
848
## June 11, 2025
949

1050
### Enhanced Static Analysis: HTMLHint and Checkmake Support

docs/faq.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,13 @@ In-trial and open-source plans have lower rate limits than the paid plan. In all
205205

206206
The following limits enforced _per developer_:
207207

208-
| Feature | Free Plan | Trial Plan | OSS Plan | Pro/Lite Plan |
209-
| ---------------- | ------------------------------------------ | ----------------------------- | ----------------------------- | ----------------------------- |
210-
| Files per hour | 200/hour | 200/hour | 200/hour | 400/hour |
211-
| Files per PR | 100 | 100 | 100 | 200 |
212-
| 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 |
213-
| Chat | N/A | 25 back-to-back, then 50/hour | 10 back-to-back, then 25/hour | 25 back-to-back, then 50/hour |
208+
| Feature | Free Plan | Trial Plan | OSS Plan | Pro/Lite Plan |
209+
| -------------------------------- | ------------------------------------------ | --------------------------------- | ----------------------------- | ----------------------------- |
210+
| Files per hour | 200/hour | 200/hour | 200/hour | 400/hour |
211+
| Files per PR | 100 | 100 | 100 | 200 |
212+
| 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 |
213+
| Reviews per hour (IDE Extension) | 1/hour | 5/hour (Pro trial), 1/hour(Other) | 1/hour | 5/hour (Pro), 1/hour(Lite) |
214+
| Chat | N/A | 25 back-to-back, then 50/hour | 10 back-to-back, then 25/hour | 25 back-to-back, then 50/hour |
214215

215216
## Integration Guide {#integration-guide}
216217

docs/guides/config-vscode.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ The instructions on this page are specific to using the extension with VSCode. I
1414

1515
To navigate to the settings screen for the CodeRabbit VSCode extension, follow these steps:
1616

17-
1. In the activity bar, click the Extensions icon.
17+
1. Open the CodeRabbit activity bar/sidebar.
1818

19-
1. In the sidebar, under **Installed**, click the gear-shaped **Manage** icon in the CodeRabbit row.
19+
1. In the sidebar, click on gear shaped icon on top right(beside logout icon).
2020

21-
1. In the menu that appears, select **Settings**.
21+
1. You can also search for CodeRabbit: Settings in the command palette to open the settings.
2222

2323
The settings screen contains the following configuration controls.
2424

@@ -32,6 +32,14 @@ The **Agent Type** setting lets you choose the extension's response to using the
3232

3333
- **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.
3434

35+
- **Codex CLI**: The extension opens the Terminal pane of your IDE and tries to use the `codex` command-line program to apply the suggested fix to your code. You need to have Codex CLI installed for this option to be effective.
36+
37+
- **Cline**: The extension opens the `Cline` sidebar and runs a task to apply the suggested fix to your code. You need to have the `Cline` extension installed for this option to be effective.
38+
39+
- **Roo**: The extension opens the `Roo` sidebar and runs a task to apply the suggested fix to your code. You need to have the `Roo` extension installed for this option to be effective.
40+
41+
- **Kilo Code**: The extension opens the `Kilo Code` sidebar and runs a task to apply the suggested fix to your code. You need to have the `Kilo Code` extension installed for this option to be effective.
42+
3543
- **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.
3644

3745
For more information about the **Fix with AI** feature, see [Request help from your AI coding agent](/guides/use-vscode#agent).

docs/guides/custom-reports.md

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,166 @@ Issues and tickets brings in conversations, descriptions, and comments from Jira
295295
- `<issue_description>`: markdown - The description of the issue.
296296
- `<issue_comments>`: array of comment objects - Contains all the comments made on the issue.
297297

298+
#### Remove PRs without a "Score Card/Chart" bot comment
299+
300+
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 `<pr_score_card>` in your prompt.
301+
302+
> **IMPORTANT:** This will automatically remove any pull requests from your reports if they do not contain a "Score Card" or "Score Chart" bot comment. Using this option without setting up a flow to create these comments will result in `No new pull request activity in the last XYZ hours` errors. Do not enable this option unless you have created a "Score Card" or "Score Chart" bot comment flow.
303+
304+
For example you can ask coderabbit to check serveral conditions on a pull request and produce a "Score Chart":
305+
306+
<details>
307+
<summary>Click to view example User Score Card/Chart Comment:</summary>
308+
309+
![Score Card/Chart Trigger Comment Example](/img/guides/score-card-trigger-comment.png)
310+
311+
```markdown
312+
@coderabbitai
313+
Use the <overall_instructions> 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.
314+
315+
<overall_instructions>
316+
317+
**Instructions:**
318+
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.
319+
**Scoring Parameters:**
320+
321+
1. **Basic Code Standards (Score out of 2)**
322+
323+
- Avoidance of hard-coded values
324+
- No repetition of code (DRY principle)
325+
326+
2. **Code Readability (Score out of 2)**
327+
328+
- Presence of meaningful comments
329+
- Proper variable declaration using `const` and `let`
330+
331+
3. **Error Handling (Score out of 4)**
332+
333+
- Handling failure scenarios (e.g., try-catch, fallbacks)
334+
- Proper loading state implementation (e.g., button click loading states)
335+
- Handling edge cases (e.g., checking for undefined or missing values)
336+
- Input validation (ensuring correct user inputs)
337+
338+
4. **Circle CI Check Validation (Score: 0 or 1)**
339+
- `0` → Not Passed
340+
- `1` → Passed
341+
342+
**Final Score Calculation:**
343+
Combine the scores from the parameters above to derive the final code quality score (out of 5).
344+
**Output Format:**
345+
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:
346+
347+
- **User Name (User)**
348+
- **Basic Code Standards (BCS) (out of 2)**
349+
- **Code Readability (CR) (out of 2)**
350+
- **Error Handling (EH) (out of 4)**
351+
- **Shopify Theme Check (CI) (out of 1)**
352+
- **Final Code Quality Score (FCQS) (out of 9)**
353+
354+
</overall_instructions>
355+
356+
<\_example>
357+
358+
## Column Notation
359+
360+
- **User Name (User)**
361+
- **Basic Code Standards (BCS) (out of 2)**
362+
- **Code Readability (CR) (out of 2)**
363+
- **Error Handling (EH) (out of 4)**
364+
- **Shopify Theme Check (CI) (out of 1)**
365+
- **Final Code Quality Score (FCQS) (out of 9)**
366+
367+
## Score Chart
368+
369+
| User | BCS (2) | CR (3) | EH (2) | CI (1) | FCQS (9) |
370+
| -------- | ------- | ------ | ------ | ------ | -------- |
371+
| John Doe | 2 | 3 | 2 | 1 | 9 |
372+
373+
</\_example>
374+
```
375+
376+
</details>
377+
378+
Then CodeRabbit will reply with a score for you pull request:
379+
380+
<details>
381+
<summary>Click to view resulting Score Card/Chart bot comment:</summary>
382+
383+
![CodeRabbit Score Card/Chart Result Comment Example](/img/guides/score-card-result-comment.png)
384+
385+
</details>
386+
387+
You can then utilize this in a report. We recommend your report looks specifically for these score cards and puts together a unified report:
388+
389+
<details>
390+
<summary>Click to view example Report Prompt when using Score Card/Chart:</summary>
391+
392+
![Report Example](/img/guides/score-card-report-result.png)
393+
394+
![Where to put this prompt](/img/guides/where-score-report-prompt-go.png)
395+
396+
Prompt Example:
397+
398+
```markdown
399+
Use the <overall_instructions> 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.
400+
401+
<overall_instructions>
402+
**Instructions:**
403+
404+
Locate the score chart comment in the <bot_comments>. There will be a single comment with data on these fields:
405+
406+
- **User Name (User)**
407+
- **Basic Code Standards (BCS) (out of 2)**
408+
- **Code Readability (CR) (out of 2)**
409+
- **Error Handling (EH) (out of 4)**
410+
- **Shopify Theme Check (CI) (out of 1)**
411+
- **Final Code Quality Score (FCQS) (out of 9)**
412+
413+
These details may also be in the form of a chart such as:
414+
415+
## Score Chart
416+
417+
| User | BCS (2) | CR (3) | EH (2) | CI (1) | FCQS (9) |
418+
| -------- | ------- | ------ | ------ | ------ | -------- |
419+
| John Doe | 2 | 3 | 2 | 1 | 9 |
420+
421+
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.
422+
423+
</overall_instructions>
424+
425+
<example>
426+
427+
## Column Notation
428+
429+
- **User Name (User)**
430+
- **Basic Code Standards (BCS) (out of 2)**
431+
- **Code Readability (CR) (out of 2)**
432+
- **Error Handling (EH) (out of 4)**
433+
- **Shopify Theme Check (CI) (out of 1)**
434+
- **Final Code Quality Score (FCQS) (out of 9)**
435+
436+
## Score Chart
437+
438+
| User | BCS (2) | CR (3) | EH (2) | CI (1) | FCQS (9) | PR URL |
439+
| -------- | ------- | ------ | ------ | ------ | -------- | ------ |
440+
| John Doe | 2 | 3 | 2 | 1 | 9 | URL |
441+
| Alex Foo | 2 | 3 | 2 | 1 | 9 | URL |
442+
443+
</example>
444+
<include_bot_comments>
445+
<pr_score_card>
446+
```
447+
448+
</details>
449+
450+
**Best Practices for Score Cards/Charts:**
451+
452+
- 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.
453+
- Only include checks for very specific scenarios, such as a specific check failing or using tabs vs spaces.
454+
- 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.
455+
- Make one point for each specific check and make sure its a True/False condition.
456+
- Instead of manually commenting on pull requests you can use the [Github Actions Bot](https://github.com/marketplace/actions/create-or-update-comment) to automatically comment on pull requests and trigger coderabbit score card/chart comments by including `@coderabbit` in the comment.
457+
298458
## Best Practices
299459

300460
1. **Be Specific**

docs/guides/initial-configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ By default, CodeRabbit writes thorough code reviews with several sub-sections. I
7777

7878
## Adjust path-specific CodeRabbit behavior {#path}
7979

80-
These settings direct CodeRabbit to treat various files and and locations in
81-
your repository differently.
80+
You can give CodeRabbit additional instructions for reviewing specific files or
81+
locations in your repository, or configure CodeRabbit to disregard certain file paths
82+
during code reviews.
8283

8384
For an overview about using path-based instructions in CodeRabbit, see [Path-based instructions](/guides/review-instructions#path-based).
8485

docs/guides/use-vscode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ You can let CodeRabbit automatically review commits that you make to your local
1818

1919
To perform an automatic review, follow these steps:
2020

21-
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?**
21+
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?**
2222

2323
1. Click **Yes**. The CodeRabbit sidebar appears in your VSCode window.
2424

0 commit comments

Comments
 (0)