Main Content
Number of Function Parameters
Number of function arguments
Description
Note
Use Bug Finder instead of Code Prover for computing code metrics. Support for computing code metrics in Code Prover will be removed in a future release. See Version History.
This metric measures the number of function arguments.
If ellipsis is used to denote variable number of arguments, when calculating this metric, the ellipsis is not counted.
The recommended upper limit for this metric is 5. For less dependency between functions and fewer side effects, try to enforce an upper limit on this metric.
To enforce limits on metrics, see Compute Code Complexity Metrics Using Polyspace.
Examples
Metric Information
Group: Function |
Acronym: PARAM |
HIS Metric: Yes |