compute function cyclomatic complexity...
...and issue message if above a threshold.
Since you're already analyzing the functions, it would seem to be a relatively minor addition to compute a cyclomatic complexity for the function (he said, while signing up someone else to do all the work).
Then, similarly to the "-size" option, the user could be allowed to set a max complexity, above which an info message could be generated.
This would help reduce our reliance on additional tools.
The recently released PC-lint Plus version 2.0 provides a comprehensive Metrics solution that provides the ability to report the values of dozens of built in metrics, including cyclomatic complexity, define custom metrics, and diagnose situations where metrics exceed specified thresholds. See Chapter 10 of the version 2.0 Reference Manual for details.
-
Anonymous commented
please also consider nesting complexity