Introduction

## Quality Reports

###

Understand for Ada's Quality Reports are designed to provide information about areas of the analyzed source that might not meet standards or that hold the potential for trouble. They also identify areas where extra programming has been done but not needed. This sometimes identifies areas that aren't yet complete, or that haven't been maintained completely.

### Program Unit Complexity Report

The Program Unit Complexity Report lists the Cyclomatic Complexity for each program unit that has been analyzed. Also sometimes called the McCabe Complexity, the higher this metric the more likely a program unit is to be difficult to test and maintain without error.

### Program Unit Metrics Report

The Program Unit Metrics Report lists these metrics for each program unit that has been analyzed:

- lines - the total number of lines in the program unit.
- comment lines - the number of lines that contain Ada comments in the program unit.
- blank lines - the number of blank lines in the program unit
- code-exe lines - the number of source lines that are executable, note that this may exceed the number of Ada statements since they may cross line boundaries.
- code-dec lines - the number of source lines used to declare Ada entities (such as packages, types, parameters, etc...)
- code-exe semi - the number of executable statements, as counted by semicolons in executable code. Always <= code-dec lines.
- code-dec semi - the number of declarations as counted by semicolon terminated declaration statements. If the -count_declarations option is specified when the database is created, this heading becomes "decls" and the count is the number of declarations.

Note that specifications and bodies of program units are reported separate.

### Program Unit Inclusive Metrics Report

The Program Unit Inclusive Metrics Report sums each of the metrics provided in the Program Unit Metrics Report (above) for all program units nested in a given program unit.

### File Metrics Report

The File Metrics Report provides the same information as the other metrics reports except by source file.

### Unused Object Report

This report identifies any object (variable, parameter, constant) that is declared but never used.

### Unused Type Report

This report identifies any type (type, subtype, derived type) that is declared but never used to declare or derive a new object or type.

### Unused Program Unit Report

This report identifies program units that are declared but never used.
Note that this listing in this report doesn't mean the system doesn't need this program unit. For instance, interrupt handlers that are called by system interrupts are often never "used" within the other source of the program.

### Withs Not Needed Report

This report lists, for each program unit, any With statements it has but doesn't need (by not using any items made public by the With statement).

Note that this covers only direct usage in the program unit and doesn't account for side effects that may be needed by the program to operate correctly. For instance, sometimes a package can be Withed just to start a task or to execute code in its begin/end block

Scientific Toolworks, Inc. http://www.scitools.com Voice: (802) 763-2995 Fax: (802) 763-3066 support@scitools.com sales@scitools.com