feat: new Coverage and overview metrics#2590
Conversation
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>
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>
|
Overall readability score: 54.18 (🟢 +0.06)
View detailed metrics🟢 - Shows an increase in readability
Averages:
View metric targets
|
Codacy's Analysis Summary0 new issue (≤ 0 minor issue) Review Pull Request in Codacy →
|
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>
There was a problem hiding this comment.
Pull Request Overview
The pull request is up to standards based on static analysis. It successfully updates the Organization Overview documentation to reflect new metrics and layout changes. I have identified a few technical inconsistencies in the metric descriptions and link behaviors that should be addressed to ensure documentation accuracy.
Test plan proposal
- Verify that internal anchors (
#grade,#complexity,#duplication,#coverage) correctly navigate to the intended sections when clicked from the tabs list. - Confirm that the 'Coverage' metric description in the summary table (line 138) aligns with the product behavior for users on Trial/OSS vs Paid plans.
- Ensure the Markdown table at line 50 renders correctly in various viewport widths, specifically checking that the embedded HTML links and superscripts do not cause column misalignment.
- Validate that all external links to GitLab and Bitbucket API documentation open in a new browser tab/window consistently.
About this PR
- The Jira issue key is missing from the PR title and the corresponding task in the checklist is unchecked. If this PR is linked to a specific ticket, please update the title (e.g., 'feat(ORG-123): new Coverage and overview metrics').
🗒️ Improve review quality by adding custom instructions.
💡 Codacy uses AI. Check for mistakes.
|
|
||
| | Metric | Description | | ||
| | ------ | ----------- | | ||
| | **Coverage** | `coveredLines / coverableLines` <br/>Aggregation of all covered lines divided by all coverable lines across all repositories (or your filter selection, see [filters](#overview-filters)). This metric only includes repositories reporting coverage. | |
There was a problem hiding this comment.
🟡 MEDIUM RISK
The description for the 'Coverage' metric in this table only covers the calculation for Paid plans. To avoid misleading users on other plans, it should reflect the 'Average' calculation mentioned in the previous section.
Try running the following prompt in your IDE agent:
Update the 'Coverage' row in the table at line 138 of docs/organizations/reporting/organization-overview.md to mention that the calculation is plan-dependent (Aggregation for Paid plans vs Average for Trial/OSS plans), referencing the specific logic described in lines 124-125.
|
|
||
| This panel shows, from the top 100 most recently updated repositories, which repositories are above goal, below goal, or have no goal. Because complexity is better when lower, repositories above goal are highlighted so you can review and act on them. | ||
|
|
||
| At the bottom of the tab, the complex files distribution helps you understand which files are complex because they are above goal, below goal, or in repositories without a goal. Files are not filterable, while repository goal distributions are. |
There was a problem hiding this comment.
🟡 MEDIUM RISK
This sentence implies that files below the goal are considered complex, which contradicts the definition provided earlier. If the chart displays the total file distribution, the phrasing should be adjusted.
This might be a simple fix:
| At the bottom of the tab, the complex files distribution helps you understand which files are complex because they are above goal, below goal, or in repositories without a goal. Files are not filterable, while repository goal distributions are. | |
| 102 | At the bottom of the tab, the file distribution helps you understand the status of your files relative to their goals (above goal, below goal, or in repositories without a goal). |
| - **GitLab:** date when the project was last updated (value of `last_activity_at` from the [GitLab Groups API](https://docs.gitlab.com/ee/api/groups.html)). Note that this value is only updated [at most once per hour](https://gitlab.com/gitlab-org/gitlab/-/issues/20952)). | ||
| - **Bitbucket:** date when the repository was last updated (value of `updated_on` from the [Bitbucket Repositories API](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-group-repositories)). **On Bitbucket Server** Codacy can't obtain this information and the list displays the repositories in alphabetical order. |
There was a problem hiding this comment.
⚪ LOW RISK
Suggestion: For consistency with the GitHub link above, please add the target attribute to these external API links.
This might be a simple fix:
| - **GitLab:** date when the project was last updated (value of `last_activity_at` from the [GitLab Groups API](https://docs.gitlab.com/ee/api/groups.html)). Note that this value is only updated [at most once per hour](https://gitlab.com/gitlab-org/gitlab/-/issues/20952)). | |
| - **Bitbucket:** date when the repository was last updated (value of `updated_on` from the [Bitbucket Repositories API](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-group-repositories)). **On Bitbucket Server** Codacy can't obtain this information and the list displays the repositories in alphabetical order. | |
| 77 | - **GitLab:** date when the project was last updated (value of `last_activity_at` from the [GitLab Groups API](https://docs.gitlab.com/ee/api/groups.html){: target="_blank"}). Note that this value is only updated [at most once per hour](https://gitlab.com/gitlab-org/gitlab/-/issues/20952){: target="_blank"}). | |
| 78 | - **Bitbucket:** date when the repository was last updated (value of `updated_on` from the [Bitbucket Repositories API](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-group-repositories){: target="_blank"}). **On Bitbucket Server** Codacy can't obtain this information and the list displays the repositories in alphabetical order. |
👀 Live preview
https://coverage-and-overview-metrics--docs-codacy.netlify.app/organizations/reporting/organization-overview/
🚧 To do
Test plan proposal