fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref 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 | No |
Interactive command files | No |
Embedded in the Fortran code | No |
Default
CODE QUALITY ERROR WEIGHTING: 10
Copyright ©1995 to 2025 Software Validation Ltd. All rights reserved.