You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: How to review your code with the VSCode extension.
4
+
slug: /code-editors
5
+
sidebar_label: Overview
4
6
---
5
7
6
8
This page is about the CodeRabbit VSCode extension. For a broader overview of CodeRabbit, see [Introduction](/overview/introduction).
@@ -9,26 +11,24 @@ This page is about the CodeRabbit VSCode extension. For a broader overview of Co
9
11
10
12
The CodeRabbit VSCode extension lets you apply a limited subset of CodeRabbit’s code-review features to your local development environment, directly from the VSCode IDE.
11
13
14
+
You can use the extension on its own, or you can use it to complement your local development on a repository whose remote has CodeRabbit installed.
15
+
12
16
The extension is intended to let you use the power of CodeRabbit to rapidly tune and tidy your code changes locally, before you publish your changes to your team's remote repository and start a more thorough code review.
13
17
14
18
## Features
15
19
16
20
The extension includes the following features:
17
21
18
-
- Automatic reviews of local Git commmits
19
-
20
-
- Manually requested reviews of local code changes, either committed or uncommited
22
+
- Automatic code reviews on every local Git commit
23
+
- Manually requested reviews of local code changes
21
24
22
25
## Price and limitations
23
26
24
-
This extension is free to install and use, and works with any tier of CodeRabbit account. Rate limits apply to the numnber of local reviews that you can request per hour.
27
+
This extension is free to install and use, and works with any tier of CodeRabbit account. Rate limits apply to the number of local reviews that you can request per hour.
25
28
26
-
You can use the extension on its own, or you can use it to complement your local development on a repository whose remote has CodeRabbit installed.
27
-
28
-
As such, the extension makes only the most basic CodeRabbit review features available, with default settings applied. Advanced CodeRabbit features, such as interactive chat and project learnings, aren't available through the VSCode extension. These features are available only by [integrating CodeRabbit on your remote repository](/platforms), and then allowing CodeRabbit to review pull requests.
29
+
The extension makes only basic CodeRabbit review features available, with default settings applied. Advanced CodeRabbit features, such as interactive chat and project learnings, aren't available through the VSCode extension. These features are available only by [integrating CodeRabbit on your remote repository](/platforms), and then allowing CodeRabbit to review pull requests.
29
30
30
31
## What's next
31
32
32
-
-[Install the VSCode extension](/guides/install-extension)
33
-
34
-
-[Use the VSCode extension](/guides/use-extension)
33
+
-[Install the VSCode extension](/guides/install-vscode)
Copy file name to clipboardExpand all lines: docs/guides/use-vscode.md
+47-9
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,10 @@ title: Use the VSCode extension
3
3
description: How to review your code with the VSCode extension.
4
4
---
5
5
6
-
This page is about using the CodeRabbit VSCode extension. For more information about the extension, see
7
-
[Overview](/guides/about-vscode). To learn how to install the extension, see [Install the VSCode extension](/guides/install-vscode).
6
+
This page is about performing local code reviews using the CodeRabbit VSCode extension. For more information about the extension, see
7
+
[Review local changes](/code-editors). To learn how to install the extension, see [Install the VSCode extension](/guides/install-vscode).
8
+
9
+
The CodeRabbit VSCode extension works by comparing changes in your current, checked-out Git branch against another branch in your local repository. You can use the extension to automatically perform full-branch changes after every commit, or make different kinds of comparisons by manually requesting a review.
8
10
9
11
## Automatically review local commits
10
12
@@ -18,6 +20,8 @@ To perform an automatic review, follow these steps:
18
20
19
21
1. Wait for the review to complete. This might take several minutes. To cancel a review in progress, click **Stop the review**.
20
22
23
+
After the review completes, you can browse and respond to review comments as described in [Work with code reviews](#work-with-code-reviews).
24
+
21
25
For more options and control of code reviews performed using the CodeRabbit VSCode extension, you can manually request a review, as detailed in the following section.
22
26
23
27
## Manually request code reviews
@@ -26,10 +30,10 @@ To manually review changes in a local Git branch using the CodeRabbit VSCode ext
26
30
27
31
1. Click the CodeRabbit icon in the VSCode activity bar. The CodeRabbit sidebar appears.
28
32
29
-
1.Refer to **Branch** in the CodeRabbit sidebar. If you want to compare your code changes
30
-
to a branch other than the default that appears, then follow these steps:
33
+
1. If you want to compare your code changes
34
+
to a branch other than its base branch, then follow these steps:
31
35
32
-
1. Click the name of the base branch, which is `main` by default. A **Select a base branch** dialog appears, listing other branches in your local Git repository.
36
+
1. In the sidebar, under **Branch**, click the name of the base branch. A **Select a base branch** dialog appears, listing other branches in your local Git repository.
33
37
34
38
1. Select the name of a base branch to compare against.
35
39
@@ -38,16 +42,50 @@ To manually review changes in a local Git branch using the CodeRabbit VSCode ext
38
42
- To review all changes between the base branch and your current branch, including
39
43
both committed and uncommitted changes, select **Review all changes**. This is the default selection.
40
44
41
-
- To limit the review to only changes on your branch that you have committed, select **Review committed changes**. This includes both pushed and not-pushed commits on the current branch.
45
+
- To limit the review to only changes on your branch that you have committed, select **Review committed changes**. This includes commits that you have pushed to your remote repository, if any, as well as any local commits.
42
46
43
-
- To limit the review to only uncommitted changes on your branch, select **Review all changes**.
47
+
- To limit the review to only uncommitted changes on your branch, select **Review uncommitted changes**.
44
48
45
-
1. Refer to the list of **Files to review** in the sidebar. This list represents all of the files that the selected review style includes. To change this list of files, repeat the previous step to choose a different review style, or use Git features like `git stash` to remove changes to files.
49
+
1. Refer to the list of **Files to review** in the sidebar. This list represents all of the files that the selected review action includes. To change this list of files, repeat the previous step to choose a different review action, or use Git features like `git stash` to selectively remove changes.
46
50
47
51
1. To perform the review, click the button part of the menu. The CodeRabbit sidebar displays a **Review** section with the review's progress.
48
52
49
53
1. Wait for the review to complete. This might take several minutes. To cancel a review in progress, click **Stop the review**.
50
54
55
+
After the review completes, you can browse and respond to review comments as described in the following section.
56
+
57
+
## Work with code reviews
58
+
59
+
The CodeRabbit VSCode extension presents code reviews as a series of actionable comments, connected to specific files and lines. It gives you tools to apply its suggestions quickly, when possible.
60
+
61
+
### Browse comments
62
+
63
+
After the extension finishes its review, it adds any comments to the CodeRabbit sidebar under the **Files** heading in the **Reviews** section.
64
+
65
+
Each item in **Files** is a comment referring to one or more lines in that file. Click the comment to see a detailed, inline comment in the editor, attached to the appropriate file and lines.
66
+
67
+
You can react to these comments however you want: you can apply their advice literally, or let them guide you to find alternate solutions, or ignore them entirely. CodeRabbit comments are metadata stored with VSCode, and are not part of your files. The presence of comments doesn't block your use of version control.
68
+
69
+
### Apply suggested changes
70
+
71
+
Whenever possible, the CodeRabbit VSCode extension attaches discrete change suggestion to comments in the form of code diffs. For example, if it detects a typo in a new function name, the extension might attach a diff with a suggested correction.
72
+
73
+
If you agree with CodeRabbit about the suggested fix and want to apply to exactly as it proposes, click the checkmark-shaped **Apply suggested change** icon in the inline comment. The extension makes the change for you in the editor.
74
+
75
+
### Ignore or collapse comments
76
+
77
+
To remove a comment from the editor, click its **Ignore** icon.
78
+
79
+
To remove a comment but keep an icon in the editor noting its presence, click its **Collapse** icon.
80
+
81
+
To see an ignored or collapsed comment in the editor again, click its summary in the CodeRabbit sidebar.
82
+
83
+
### Browse previous reviews
84
+
85
+
If you have performed reviews prior to the most recent review in the current VSCode window, then you can browse the comments from these reviews under the **Previous reviews** heading in the CodeRabbit sidebar.
86
+
87
+
If a past review comment no longer applies to the current state of your code, then clicking that comment won't display a detailed comment or suggestion in the editor.
88
+
51
89
## What's next
52
90
53
-
-[Uninstall the VSCode extension](/guides/install-extension)
91
+
-[Uninstall the VSCode extension](/guides/uninstall-vscode)
Copy file name to clipboardExpand all lines: docs/overview/introduction.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -98,12 +98,12 @@ For private repositories, a number of pricing tiers are available. These range f
98
98
99
99
As a separate, free product, CodeRabbit offers a VSCode extension that brings a subset of core CodeRabbit features to VSCode. This lets you use the power of CodeRabbit to tune and tidy your code changes locally before pushing your changes into a formal pull request for more thorough reviews.
100
100
101
-
For more information, see [About the VSCode extension](/guides/about-vscode).
101
+
For more information, see [Review local changes](/code-editors).
102
102
103
103
## What's next
104
104
105
105
-[Quickstart](/getting-started/quickstart/) lets you experience your first CodeRabbit code review first-hand.
106
106
107
-
-[About the VSCode extension] guides you through installing and using a subset of CodeRabbit features directly from your code editor.
107
+
-[Review local changes](/code-editors) guides you through installing and using a subset of CodeRabbit features directly from your code editor.
108
108
109
109
-[Why CodeRabbit?](/overview/why-coderabbit) dives further into the philosophies and technologies that drive CodeRabbit.
0 commit comments