| Table of Contents |
Documentation
| Name | Key | Description |
| Blank comments | Number of non-significant comments lines (empty comment line, comment line containing only special characters, etc.). | |
| Comment lines | comment_lines | Number of javadoc, multi-comment and single-comment lines. Empty comment lines like, header file comments (mainly used to define the license) and commented-out lines of code are not included. |
| Comments (%) | comment_lines_density | Density of comment lines = Number of Comment lines / (Number of Lines of code + Number of Comment lines) * 100 With such a formula:
|
| Public documented API (%) | public_documented_api_density | Density of public documented API = (Public API - Public undocumented API) / Public API * 100 |
| Public undocumented API | public_undocumented_api | Public API without comments header. |
Duplications
| Name | Key | Description |
Duplicated blocks | duplicated_blocks | Number of duplicated blocks of lines. |
| Duplicated files | duplicated_files | Number of files involved in a duplication. |
| Duplicated lines | duplicated_lines | Number of lines involved in a duplication. |
| Duplicated lines (%) | duplicated_lines_density | Density of duplication = duplicated_lines / lines * 100 |
Reviews
| Name | Key | Description |
Active reviews |
| Number of active reviews (status not closed). |
| False-positive reviews | Number fo false-positive reviews. | |
| New unreviewed violations | Number of new unreviewed violations. | |
| Unassigned reviews | Number of unassigned reviews. | |
| Unplanned reviews | Number of unplanned reviews (not associated with an action plan). | |
| Unreviewed violations | Number of unreviewed violations. |
Rules
| Name | Key | Description |
New violations | new_violations | Number of new violations. |
New xxxxx violations | new_xxxxx_violations | Number of new violations with severity xxxxx, xxxxx being Blocker, Critical, Major, Minor or Info. |
Violations | violations | Number of violations. |
xxxxx violations | xxxxx_violations | Number of violations with severity xxxxx, xxxxx being Blocker, Critical, Major, Minor or Info. |
Weighted violations | weighted_violations | Sum of the violations weighted by the coefficient associated to each severity (Sum(xxxxx_violations * xxxxx_weight)). |
Rules compliance | violations_density | Rules compliance index (RCI) = 100 - (weighted_violations / nloc * 100) |
SQALE
| Metric | Key | Description |
|---|---|---|
| Blocker Remediation Cost | Remediation cost (in days) to fix all blocker violations.
| |
| Critical and over Remediation Cost | Remediation cost (in days) to fix all critical and blocker violations. | |
| Effort to grade X | Effort (in days) to reach grade X. | |
| Major and over Remediation Cost | Remediation cost (in days) to fix all major and critical and blocker violations. | |
| Minor and over Remediation Cost | Remediation cost (in days) to fix all minor and major and critical and blocker violations. | |
| SQALE Remediation Cost | Remediation cost (in days) to fix all violations. |
Size
| Metric | Key | Description |
|---|---|---|
| Accessors | accessors | Number of getter and setter methods used to get (reading) or set (writing) a class property. Getters Setters |
| Classes | classes | Number of classes (including nested classes, interfaces, enums and annotations). |
| Directories | directories | Number of directories. |
| Files | files | Number of files. |
| Generated Lines | Number of generated lines (Cobol seulement). | |
| Generated lines of code | Number of generated lines of code (Cobol seulement). | |
| Lines | lines | Number of physical lines (number of carriage returns). |
| Lines of code | ncloc | Number of physical lines that contain at least one character which is neither a whitespace or a tabulation or part of a comment. |
| Methods | functions | Number of methods. Notes for Java:
|
| Packages | packages | Number of packages. |
| Projects | projects | Number of projects in a view. |
| Public API | public_api | Number of public Classes + number of public Methods + number of public Properties (without public final static ones). |
| Statements | statements | TODO Java: Number of statements as defined in the Java Language Specification but without block definitions. Statements counter gets incremented by one each time a following keyword is encountered: if, else, while, do, for, switch, break, continue, return, throw, synchronized, catch, finally. Statements counter is not incremented by a class, method, field, annotation definition, package declaration and import declaration. |
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. |
| 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?". |
| 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: |
| 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). |
| New branch coverage | new_branch_coverage | Identical to Branch coverage but restricted to new / updated source code. |
| New coverage | new_coverage | Identical to Coverage but restricted to new / updated source code. |
| New line coverage | new_line_coverage | Identical to Line coverage but restricted to new / updated source code. |
| New lines to cover | new_lines_to_cover | Identical to Lines to cover but restricted to new / updated source code. |
| New uncovered lines | new_uncovered_lines | Identical to Uncovered lines but restricted to new / updated source code. |
| Skipped unit tests | skipped_tests | Number of skipped unit tests. |
| Uncovered branches | uncovered_branches | Number of branches which are not covered by unit tests. |
| Uncovered lines | uncovered_lines | Number of lines of code which are not covered by unit tests. |
| Unit tests | tests | Number of unit tests. |
| Unit tests duration | test_execution_time | Time required to execute all the unit tests. |
| Unit test errors | test_errors | Number of unit tests that have failed. |
| Unit test failures | test_failures | Number of unit tests that have failed with an unexpected exception. |
| Unit test success density (%) | test_success_density | Test success density = (tests - (test_errors + test_failures)) / tests * 100 |
The same kinds of metrics exist for Integration tests coverage and Overall tests coverage (Units tests + Integration tests).
Metrics on tests execution does not exist for Integration tests and Overall tests.

