FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


Q. A. ERROR WEIGHTING

Syntax:

Q[.]A[.] [INDEX] ERROR WEIGHTING [:] <integer>

CODE QUALITY [INDEX] ERROR WEIGHTING [:] <integer>

Function:

When processing is complete, FPT reports an index of code quality. This is the number of anomalies detected per thousand lines of code - the "Millibug". The value reported is computed as:

1000 * (N_Warnings + Weight * N_Errors) / N_Lines

The command Q.A. ERROR WEIGHTING sets the term Weight, the weighting factor for errors.

In order to use this facility it is recommended that a standard set of checks is written in an FSP file which is used to audit the code. A typical report is shown below:

Diagnostic Summary

          Total diagnostics 7032       Highest severity    2

          Notes                          617
          Warnings                      4051
          Errors                        2364

Code Quality Index

          Error weighting                 10
          Total lines                 335115
          Index per 1000 lines        82.631

When FPT is run with the checks:

    % CHECK ALIGNMENT
    % CHECK ARGUMENTS
    % CHECK EQUIVALENCE
    % CHECK NAMES IN COMMON
    % CHECK PARAMETER VALUES
    % CHECK USAGE
    % Q.A. ERROR WEIGHTING : 10

a rating in excess of 10.0 is considered to be cause for concern.

Where to use this command:

Operating system command line

Yes


Configuration file, config.fsp

Yes


Specification (FSP) files, *.fsp

Yes


Interactively, to FPT> prompt:

Yes


Interactive command files

Yes


Embedded in the Fortran code

No



Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.