Skip to content

Commit 5ccb913

Browse files
Merge branch 'feature/issue/331' into feature/issue/332
2 parents 4165276 + 5150e8c commit 5ccb913

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

docs/guides/best-practices-vscode.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Best practices for using the VSCode extension
3+
description: Recommended ways to get the most out of CodeRabbit's VSCode extension.
4+
---
5+
6+
Maximize your productivity and code quality with these best practices for the CodeRabbit VSCode extension. For setup instructions, see [Install the VSCode extension](/guides/install-vscode). To get started, visit [Use the VSCode extension](/guides/use-vscode).
7+
8+
## Recommended setup
9+
10+
- **Set a default comparison branch**
11+
Choose your main development branch (e.g., `main`, `develop`, or trunk) as the default for reviews. This ensures consistent and relevant diffs.
12+
→ Use `CodeRabbit: Base Branch` in the Command Palette.
13+
14+
- **Enable auto-reviews on commit**
15+
Let CodeRabbit automatically review your code after each commit to catch issues early and maintain momentum.
16+
→ Toggle `CodeRabbit: Auto Review on Commit` in extension settings.
17+
18+
- **Pin CodeRabbit to the sidebar**
19+
Keep the CodeRabbit icon visible in the activity bar for instant access to reviews and history.
20+
21+
- **Keep Git in sync**
22+
Regularly fetch and rebase or merge from your base branch. This keeps your diffs clean and prevents unnecessary noise in reviews.
23+
24+
---
25+
26+
## Daily workflow tips
27+
28+
### 1. Commit often, review often
29+
30+
Make small, frequent commits. CodeRabbit can review incremental changes, helping you spot issues early and keep reviews manageable.
31+
32+
### 2. Use manual reviews for partial code
33+
34+
For work-in-progress or uncommitted changes, use `CodeRabbit: Review Selected Files` or `Review Current Changes`. This is ideal for exploratory or experimental work.
35+
36+
### 3. Follow up on comments
37+
38+
Always address CodeRabbit’s suggestions. Even if you disagree, double-check the feedback. Use comments as a checklist before pushing to remote.
39+
40+
### 4. Re-review after refactoring
41+
42+
After significant changes or refactoring, run `Review Current Branch` again to validate new logic and catch regressions.
43+
44+
---
45+
46+
## Performance tips
47+
48+
- **Avoid large, monolithic commits**
49+
Break up big changes into logical units. This speeds up reviews and improves feedback accuracy.
50+
51+
- **Close unused VSCode windows**
52+
Running multiple VSCode instances with the extension can impact performance.
53+
54+
- **Use `.coderabbitignore`**
55+
Exclude files or directories you don’t want reviewed to reduce clutter and speed up analysis.
56+
57+
---
58+
59+
## Team collaboration tips
60+
61+
- **Share `.vscode/settings.json`**
62+
Align CodeRabbit settings (like base branch and ignored paths) across your team for consistency.
63+
64+
- **Document your CodeRabbit workflow**
65+
Add a section to your project README outlining when to run reviews, what to check, and how to handle feedback.
66+
67+
- **Integrate with CI**
68+
Use CodeRabbit both locally and in your CI pipeline for consistent, automated code reviews.
69+
70+
---
71+
72+
## Keep your tools updated
73+
74+
- Regularly update the CodeRabbit extension for the latest features and fixes.
75+
- Keep VSCode and Git up to date for best compatibility.
76+
- Watch the [CodeRabbit GitHub repo](https://github.com/coderabbitai/coderabbit-vscode) for release notes and updates.
77+
78+
---
79+
80+
By following these practices, you’ll catch bugs earlier, streamline your workflow, and write more reliable code with confidence.

sidebars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ const sidebars: SidebarsConfig = {
128128
"guides/install-vscode",
129129
"guides/use-vscode",
130130
"guides/config-vscode",
131+
"guides/best-practices-vscode",
131132
"guides/troubleshooting-vscode",
132133
"guides/uninstall-vscode",
133134
],

0 commit comments

Comments
 (0)