Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: VS Code plugin open PR list ALA-697 #1936

Merged
merged 24 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
aa2d77b
wip: Add TODO
nicklem Nov 10, 2023
3966f14
feat: Update content
nicklem Nov 10, 2023
7874742
feat: Tweak content
nicklem Nov 10, 2023
e804c41
feat: Screenshots
nicklem Nov 10, 2023
dc6e9c4
feat: Improve IA
nicklem Nov 10, 2023
cad26a3
wip: Update TODOs
nicklem Nov 10, 2023
434010f
feat: Update screenshots
nicklem Nov 13, 2023
7d14cda
Merge branch 'master' into ALA-697-doc-vs-code-plugin-open-pr-list
nicklem Nov 14, 2023
830c84e
clean: Remove TODOs
nicklem Nov 14, 2023
7036335
feat: Add link to Managing branches
nicklem Nov 17, 2023
c34ecbc
feat: Apply suggestions from code review
nicklem Nov 17, 2023
3820815
feat: Apply suggestions from code review
nicklem Nov 17, 2023
4f503e2
feat: Tweaks
nicklem Nov 17, 2023
90bc51b
Merge branch 'master' into ALA-697-doc-vs-code-plugin-open-pr-list
nicklem Nov 17, 2023
963ce08
Merge branch 'master' into ALA-697-doc-vs-code-plugin-open-pr-list
nicklem Nov 20, 2023
dcc2451
feat: Apply suggestions from code review
nicklem Nov 20, 2023
55cc5a2
Merge branch 'master' into ALA-697-doc-vs-code-plugin-open-pr-list
nicklem Nov 22, 2023
e4f5757
Merge branch 'master' into ALA-697-doc-vs-code-plugin-open-pr-list
nicklem Nov 24, 2023
d2e4beb
feat: Apply code review suggestion
nicklem Nov 24, 2023
e2591e6
feat: Apply code review suggestion
nicklem Nov 24, 2023
213d287
feat: Tweak wording
nicklem Nov 27, 2023
9a6f618
Merge branch 'master' into ALA-697-doc-vs-code-plugin-open-pr-list
nicklem Nov 27, 2023
5d89621
feat: Revert screenshot
nicklem Nov 27, 2023
5efde79
Merge remote-tracking branch 'origin/ALA-697-doc-vs-code-plugin-open-…
nicklem Nov 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/getting-started/images/codacy-vscode-extension-main-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,66 @@ Use this extension to get the full list of problems found by Codacy for a pull r

!!! info "To use this extension you need a [Codacy account](https://www.codacy.com/signup-codacy)"

## Interface overview

The main view of the extension displays information about the code quality and coverage changes introduced by the pull requests you're working on, as well as the quality status of analyzed branches. This information is grouped into three panels:

- [Pull request status](#status-tab)
- [Open pull requests](#open-pull-requests-tab)
- [Analyzed branch](#analyzed-branch-tab)

![Important issues](./images/codacy-vscode-extension-main-view.png)

### Status tab

The **Pull request status** tab displays the following information for the pull request of the currently checked-out branch:

- The **Quality status** of the pull request, either up to standards or not up to standards, based on the [Quality gates](../repositories-configure/adjusting-quality-gates.md) set for the repository.

- Any **Quality issues** introduced or fixed by the pull request. These are the same issues you find in the [Quality Issues tabs](../repositories/pull-requests.md#issues-tabs) in the Codacy app and are also visible in VS Code's Problems tab.

The number next to each file name is the total number of Quality issues that the pull request adds to or removes from that file. The number farther to the right, added by VS Code, is the total number of problems in that file, which may or may not be Quality issues from Codacy. If there are any Medium or Critical Quality issues, the file name is also highlighted in yellow (Medium) or red (Critical).

![Important issues](./images/codacy-vscode-extension-important-issues.png)

- The **diff coverage and coverage variation** introduced by the pull request. These are the same values you find in the [Pull request coverage overview](../repositories-coverage/pull-requests.md#coverage-overview) panel in the Codacy app.

The percentage next to each file name is the coverage variation for that file.

- Sequences of **duplicate code** (clones) introduced by the pull request. These are the same ones you find in the [Quality Duplication tabs](../repositories/pull-requests.md#duplication-tabs) in the Codacy app.

- Variations in **code complexity** introduced by the pull request.

### Open pull requests tab

![Pull requests tab UI](images/codacy-vscode-extension-pull-requests-tab.png)

The **Open Pull Requests** tab lists all open pull requests for the repository, including the following information for each:

- The status of the pull request, which is visible on hover:

- Analyzing, if Codacy is analyzing the branch.

- Up to standards or not up to standards, based on the [Quality gates](../repositories-configure/adjusting-quality-gates.md) set for the repository.

- The author of the pull request.

- The source and target branches of the pull request.

- Any **Quality issues** introduced or fixed by the pull request. These are the same issues you find in the [Quality Issues tabs](../repositories/pull-requests.md#issues-tabs) in the Codacy app.

- Sequences of **duplicate code** (clones) introduced by the pull request. These are the same ones you find in the [Quality Duplication tabs](../repositories/pull-requests.md#duplication-tabs) in the Codacy app.

- Variations in **code complexity** introduced by the pull request. This is the same value you find on the [Pull request quality overview](../repositories/pull-requests.md#quality-overview) in the Codacy app.

### Analyzed branch tab

![Analyzed branch tab UI](images/codacy-vscode-extension-analyzed-branch-tab.png)

The **Analyzed Branch** tab appears if you switch to an analyzed branch that doesn't have an open pull request, such as the `main` or `master` branch. This tab shows an overview of the Quality issues found in that branch, grouped by recently added, introduced by the current user, issue category, and issue severity.

See [how to manage the analysis of your repository's branches](../repositories-configure/managing-branches.md).

## Installing the Codacy VS Code extension

1. Make sure that the repository you’re working on is analyzed by Codacy and that you have a [repository read](../organizations/roles-and-permissions-for-organizations.md) role or higher.
Expand All @@ -19,46 +79,29 @@ Use this extension to get the full list of problems found by Codacy for a pull r

## Getting pull request quality and coverage data

To see Codacy quality and coverage data for the pull request you're working on, follow these steps:
To see Codacy quality and coverage data for an open pull request, follow these steps:

1. Open the repository directory in VS Code.

!!! note
If the repository isn't on Codacy yet, [add it to Codacy](../organizations/managing-repositories.md#adding-a-repository) first.

1. Check out the branch associated with the open pull request you're working on.

1. Open the main view by clicking the **Codacy logo** in the activity bar or the **Codacy tab** in the status bar.
nicklem marked this conversation as resolved.
Show resolved Hide resolved

![Codacy main view](images/codacy-vscode-extension-sign-in.png)

1. If you’re not signed in, click the **Sign in** button to authorize VS Code on Codacy.

After completing these steps, the main view shows the result of the latest Codacy analysis for the pull request. The VS Code Problems tab lists the Quality issues found.

![Codacy main view](images/codacy-vscode-extension-main-view.png)

The main view displays the information about the code quality changes introduced by the pull request:

- The **Quality status** of the pull request, either up to standards or not up to standards, based on the [Quality gates](../repositories-configure/adjusting-quality-gates.md) set for the repository.

- Any **Quality issues** introduced or fixed by the pull request. These are the same issues you find in the [Quality Issues tabs](../repositories/pull-requests.md#issues-tabs) in the Codacy app and are also visible in VS Code's Problems tab.

The number next to each file name is the total number of Quality issues that the pull request adds to or removes from that file. The number farther to the right is the number of new Medium or Critical Quality issues. If there are any such issues, the file name is also highlighted in yellow (Medium) or red (Critical).

![Important issues](./images/codacy-vscode-extension-important-issues.png)

- The **diff coverage and coverage variation** introduced by the pull request. These are the same values you find in the [Pull request coverage overview](../repositories-coverage/pull-requests.md#coverage-overview) panel in the Codacy app.

The percentage next to each file name is the coverage variation for that file.
!!! tip
To access a complete list of Codacy commands, open the VS Code command palette (`Ctrl+Shift+P` on Windows/Linux or `Cmd+Shift+P` on macOS) and type "Codacy".

- Sequences of **duplicate code** (clones). These are the same ones you find in the [Quality Duplication tabs](../repositories/pull-requests.md#duplication-tabs) in the Codacy app.
1. Check out the pull request of interest. You can do it either manually or from the **Open Pull Requests** tab, by clicking the arrow button or using the contextual right-click menu.

- Variations in **code complexity**.
After completing these steps, the main view shows the result of the latest Codacy analysis for the pull request. The VS Code Problems tab lists the Quality issues found.

## Reviewing pull request issues

In the Problems tab, Codacy displays the same Quality issues you find in the main view and lets you navigate to the exact line of code where the issue was found.
In the **Problems tab**, Codacy displays the same Quality issues you find in the **Status tab** and lets you navigate to the exact line of code where the issue was found.

!!! note
Code coverage, duplicates, and complexity aren't currently shown in the Problems tab.
Expand Down
Loading