Code quality isn't solely determined by the issues that are directly present in your source code. Many hidden statistics and figures can impact your code's performance and accessibility to other developers.
DeepSource analysis not only identifies code-specific issues in your codebase but also calculates essential metrics that determine various aspects of your code's quality. These key metrics are displayed in the Metrics tab, providing you with valuable insights into your code's overall health.
|Total number of 3rd-party dependencies used in this repository
|Track the extent to which your application code is documented
|Line coverage of the default branch of the repository
|Branch coverage of the default branch of the repository
|Percentage of logical conditions covered in the default branch of the repository
|Weighted average of the coverage of lines, conditions, and branches executed by the tests
|New Line Coverage
|Percentage of lines in the source code covered by tests in the changeset
|New Branch Coverage
|Percentage of branches in the source code covered by tests in the changeset
|New Condition Coverage
|Percentage of logical conditions in the source code covered by tests in the changeset
|New Composite Coverage
|Weighted average of line, condition and branch coverage executed by tests in the changeset
Metrics are displayed on a chart as a trend line over time, indicating if they are above or below a threshold. Each metric is reported per analyzer, and some metrics are also aggregated across analyzers using logic explained in the documentation.
By selecting a metric, you can view its plot of value variations and adjust the duration of the displayed stats to 30, 60, or 90 days. You can also modify the allowed threshold value or remove it entirely by clicking on the options icon next to the current threshold value.
In the "Metrics" tab, a trend is shown only for first-level metrics and not for the changeset-only metrics
If a metric is measured for multiple languages, an aggregate value is calculated. The aggregate value is determined by one of three logic types for each metric:
|Calculated as a summation of the metric's values captured for all languages reported in an Analysis run
|Calculated as an arithmetic mean of the metric's values captured for all languages reported in an Analysis run
|LCV, BCV, CCV, CPCV, NLCV, NBCV, NCCV, NCPCV
|Calculated as a weighted arithmetic mean of the metric's values captured for all languages reported in an Analysis run but taking into account each language's weight fraction in the repository
Condition coverage refers to the proportion of logical conditions in the source code that are covered by tests, expressed as a percentage.
Composite coverage is a metric that calculates the weighted average of the coverage of executed lines, conditions, and branches by the tests in the source code.
Branch coverage is a measure of code coverage in a repository that includes the branches present in the code.
Line coverage is a measure of code coverage in a repository that excludes the branches in the code.
Documentation coverage measures the degree to which your application code is documented, allowing you to track and improve the comprehensiveness of your code documentation.
The External Dependencies metric denotes the overall count of third-party dependencies employed in the repository.
Updated 26 days ago