You can calculate project, file and function level code metrics using Bug Finder.
Calculate code metrics
(-code-metrics) analysis option to calculate the code metrics. For
a list of supported code metrics in Bug Finder, See Code Metrics.
Calculating stack usage metrics is supported in Code Prover. Use the option
stack usage (-stack-usage) to calculate the stack usages of your
Code Prover will not support calculating code metrics other than stack usage metrics starting from a future release. Migrate to Bug Finder for calculating code metrics.
Stack Usage Metrics
|Total size of local variables in function taking nested scopes into account plus maximum stack usage from callees|
|Total size of local variables in function plus maximum stack usage from callees|
|Maximum stack usage in the analyzed program|
|Maximum stack usage in the analyzed program taking nested scopes into account|
|Total size of all local variables in function|
|Total size of local variables in function taking nested scopes into account|
- Determination of Program Stack Usage
The verification estimates stack usage from the function call hierarchy and local variable sizes.
- Migrate Code Prover Workflows for Checking Coding Standards and Code Metrics to Bug Finder
Use Bug Finder instead of Code Prover to check compliance with various coding standards, naming conventions, and code complexity standards. Calculate code metrics by using Bug Finder.