Main Content
Number of Return Statements
Number of return
statements in a function
Description
This metric measures the number of return
statements
in a function.
The recommended upper limit for this metric is 1. If one return statement is present, when reading the code, you can easily identify what the function returns.
To enforce limits on metrics, see Compute Code Complexity Metrics Using Polyspace.
Examples
Metric Information
Group: Function |
Acronym: RETURN |
HIS Metric: Yes |