Skip to content

Commit 0a66eca

Browse files
Update complexity definition (#2460)
1 parent c9b5dd7 commit 0a66eca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/faq/code-analysis/which-metrics-does-codacy-calculate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ Codacy calculates complexity as follows:
8484

8585
- The complexity value of a file is the total sum of the cyclomatic complexities of all methods within it.
8686
- A file is considered complex if its cyclomatic complexity value is higher than the threshold [**File is complex when over**](../../repositories-configure/adjusting-quality-goals.md).
87-
- The complexity value of a commit or pull request is determined by the cyclomatic complexity of its changes.
87+
- The complexity value of a commit or pull request is calculated by summing the complexity differences of all changed files where the difference is 4 or more.
8888

8989
Codacy displays complexity on the following places:
9090

9191
|Place|Metric|
9292
|-----|------|
93-
|[Commit detail page](../../repositories/commits.md)<br/>[Pull request detail page](../../repositories/pull-requests.md)<br/>[Email notifications](../../account/emails.md#managing-your-email-notifications)|The complexity variation introduced by a commit or pull request is defined as the sum of the changes in code complexity for each file modified in the commit or pull request|
93+
|[Commit detail page](../../repositories/commits.md)<br/>[Pull request detail page](../../repositories/pull-requests.md)<br/>[Email notifications](../../account/emails.md#managing-your-email-notifications)|The complexity variation introduced by a commit or pull request is calculated by summing the complexity differences of all changed files where the difference is 4 or more.
9494
|[Files page](../../repositories/files.md)|The file complexity value is the sum of the complexity values of all methods defined within the file|
9595
|[Repository Dashboard](../../repositories/repository-dashboard.md)|Percentage of complex files in your repository and how the metric is evolving over time|
9696
|[Organization overview](../../organizations/organization-overview.md)|Average percentage of complex files in the repositories in your organization and percentage of complex files in each repository|

0 commit comments

Comments
 (0)