-
Notifications
You must be signed in to change notification settings - Fork 8
Kpc wip from coverage with codacy cli #26
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
Conversation
… relayed from the PR.
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
| } | ||
|
|
||
| for (let i=0; i<repoToolsData.data.length; i++) { | ||
| var tool = repoToolsData.data[i] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Unexpected var, use let or const instead.
| var tool = repoToolsData.data[i] | |
| let tool = repoToolsData.data[i] |
| private _issuesManager = new IssuesManager(this) | ||
|
|
||
| private _codingStandardId: number | undefined | ||
| private _repoTools: any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Unexpected any. Specify a different type.
| private _repoTools: any | |
| private _repoTools: unknown |
|
|
||
| const codacyToolsNameMap = new Map<string,string>() | ||
| for (let i=0; i<codacyToolsData.data.length; i++) { | ||
| let cTool = codacyToolsData.data[i] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: 'cTool' is never reassigned. Use 'const' instead.
| let cTool = codacyToolsData.data[i] | |
| const cTool = codacyToolsData.data[i] |
| for (let i=0; i<repoToolsData.data.length; i++) { | ||
| var tool = repoToolsData.data[i] | ||
| if (tool.settings.isEnabled) { | ||
| var uuid = codacyToolsNameMap.get(tool.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Unexpected var, use let or const instead.
| var uuid = codacyToolsNameMap.get(tool.name) | |
| let uuid = codacyToolsNameMap.get(tool.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates Codacy CLI v2 with the extension by adding code coverage display and local tooling support. Key changes include:
- Implementation of coverage decorations in the editor based on PR data.
- Addition of local tools integration with commands for installing and running tools.
- Updates to various nodes and repository management to support these new features.
Reviewed Changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/views/coverage.ts | Adds coverage decoration functionality for PR files. |
| src/views/LocalToolsTree.ts | Introduces a tree view for managing local tools and refresh logic. |
| src/local.ts | Implements local tooling commands, keypress handling, and tool installation. |
| src/views/nodes/LocalToolsToolNode.ts | Adds nodes for representing individual local tools. |
| src/views/nodes/LocalToolsNode.ts | Provides a base node for local tools with icon updates based on install status. |
| src/extension.ts | Registers new commands for coverage toggling and local mode support. |
| src/git/RepositoryManager.ts | Adds support for loading tool patterns and coding standard details. |
| src/views/nodes/PullRequestCoverageNode.ts | Updates the PR coverage node to toggle coverage display with a tree view ref. |
| src/common/parseGitRemote.ts | Improves the regex for parsing Git remote URLs by allowing an optional .git. |
| src/git/PullRequest.ts | Integrates fetching of coverage data and triggers decoration refresh. |
| src/views/nodes/BranchIssuesTreeNode.ts | Enhances the sorting with safe defaults for severity and category orders. |
| src/common/glossary.ts | Adjusts category ordering and adds new entries in the glossary. |
| src/views/PullRequestSummaryTree.ts | Includes the PR coverage node and refresh method into the summary tree. |
| src/views/nodes/index.ts | Exports the newly added local tools nodes. |
Files not reviewed (3)
- localTools.json: Language not supported
- openapitools.json: Language not supported
- package.json: Language not supported
Comments suppressed due to low confidence (1)
src/views/LocalToolsTree.ts:74
- The comment indicates that the '_onDidChangeTreeData.fire()' call may not be triggering the expected UI update. Please investigate if additional refresh logic is needed to properly update the tree view.
// FIXME: this doesn't seem to do anything
| this.installStatus = commandExistsSync(this.cliCommand) | ||
| } | ||
|
|
||
| // I fucking hate this by the way. |
Copilot
AI
Mar 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Please remove or rephrase unprofessional language in comments for a more neutral tone.
| // I fucking hate this by the way. | |
| // This is frustrating to deal with. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂
To showcase interaction with https://github.com/codacy/codacy-cli-v2
Any repo with the files and installed tools should work:
The running is to be done inside the plugin