Complexity

Name

Key

Description

Complexity

complexity

It is the cyclomatic complexity, also known as McCabe metric. Whenever the control flow of a function splits, the complexity counter gets incremented by one. Each function has a minimum complexity of 1.

A class' efferent couplings is a measure of how many different classes are used by the specific class. This metric is available only at the file level.

File cycles

file_cycles

Minimal number of file cycles detected inside a directory to be able to identify all undesired dependencies. This metric is available at the directory, module and program levels.

File edges weight

file_edges_weight

Number of file dependencies inside a directory. This metric is available at the directory, module and program levels.

File dependencies to cut

package_tangles

Number of file dependencies to cut in order to remove all cycles between directories. This metric is available at the directory, module and program levels.

File tangle

file_tangles

File tangle = Suspect file dependencies

This metric is available at the directory, module and program levels.

File tangle index

file_tangle_index

File tangle index = 2 * (File tangle / File edges weight) * 100.

This metric is available at the directory, module and program levels.

LCOM4

lcom4

Lack of cohesion of functions. See LCOM4 documentation page. This metric is available at all levels.

Number of children

noc

The number of direct and indirect descendants of this class. This metric is available at the file level.

Package cycles

package_cycles

Minimal number of directory cycles detected to be able to identify all undesired dependencies. This metric is available at the directory, module and program levels.

Package dependencies to cut

package_feedback_edges

Number of directory dependencies to cut in order to remove all cycles between directories. This metric is available at the package, module and program levels.

Package tangle index

package_tangle_index

Level of directory interdependency. Best value (0%) means that there is no cycle and worst value (100%) means that directories are really tangled. This metric is computed with the following formula: 2 * (File dependencies to cut / Number of file dependencies between directories) * 100. This metric is available at the directory, module and program levels.

Number of file dependencies between directories. This metric is available at the directory, module and program levels.

Suspect file dependencies

file_feedback_edges

File dependencies to cut in order to remove cycles between files inside a directory. Note that cycles between files inside a directory does not always mean a bad quality architecture. This metric is available at the directory level.

Suspect LCOM4 density

suspect_lcom4_density

Density of files having a LCOM4 density greater than 1. This metric is available at the directory, module and program levels.

Documentation

Name

Key

Description

Blank comments

comment_blank_lines

Number of non-significant comment lines (empty comment line, comment line containing only special characters, etc.).

Issues

Number of new issues with severity xxxxx, xxxxx being blocker, critical, major, minor or info.

Issues

violations

Number of issues.

xxxxx issues

xxxxx_violations

Number of issues with severity xxxxx, xxxxx being blocker, critical, major, minor or info.

False positive issues

false_positive_issues

Number of false positive issues

Open issues

open_issues

Number of issues whose status is Open

Confirmed issues

confirmed_issues

Number of issues whose status is Confirmed

Reopened issues

reopened_issues

Number of issues whose status is Reopened

Weighted issues

weighted_violations

Sum of the issues weighted by the coefficient associated to each severity (Sum(xxxxx_violations * xxxxx_weight)).To set the weight of each severity, log in as an administrator, go to Settings > General Settings > General and set the Rules weight property. The default value is:( (Blocker_violatons * 10) + (Critical_violations * 5) + (Major_violations * 3) + Minor_violations )

Severity

Operational/security risk: This issue might lead to an unexpected behavior in production without impacting the integrity of the whole application. Ex: NullPointerException, badly caught exceptions, lack of unit tests, etc.

Tests

Metric

Key

Description

Branch coverage

branch_coverage

On each line of code containing some boolean expressions, the branch coverage simply answers the following question: 'Has each boolean expression been evaluated both to true and false?'. This is the density of possible branches in flow control structures that have been followed during unit tests execution.

Branch coverage on new code

new_branch_coverage

Identical to Branch coverage but restricted to new / updated source code.

Coverage

coverage

It is a mix of Line coverage and Branch coverage. Its goal is to provide an even more accurate answer to the following question: 'How much of the source code has been covered by the unit tests?".

Coverage on new code

new_coverage

Identical to Coverage but restricted to new / updated source code.

Line coverage

line_coverage

On a given line of code, Line coverage simply answers the following question: 'Has this line of code been executed during the execution of the unit tests?'. It is the density of covered lines by unit tests:

Line coverage on new code

new_line_coverage

Identical to Line coverage but restricted to new / updated source code.

Lines to cover

lines_to_cover

Number of lines of code which could be covered by unit tests (for example, blank lines or full comments lines are not considered as lines to cover).

Lines to cover on new code

new_lines_to_cover

Identical to Lines to cover but restricted to new / updated source code.

Skipped unit tests

skipped_tests

Number of skipped unit tests.

Uncovered branches

uncovered_conditions

Number of branches which are not covered by unit tests.

Uncovered branches on new code

new_uncovered_conditions

Identical to Uncovered branches but restricted to new / updated source code.

Uncovered lines

uncovered_lines

Number of lines of code which are not covered by unit tests.

Uncovered lines on new code

new_uncovered_lines

Identical to Uncovered lines but restricted to new / updated source code.