代码度量
代码度量的描述和示例
您可以使用 Bug Finder 计算工程、文件和函数级别的代码度量。可以使用计算代码度量 (-code-metrics)
分析选项来计算代码度量。有关 Bug Finder 中支持的代码度量的列表,请参阅 代码度量。
Code Prover 支持计算堆栈使用量度量。使用选项计算堆栈使用量 (-stack-usage)
来计算代码的堆栈使用。
注意
在以后的版本中,Code Prover 将不支持计算堆栈使用量度量之外的代码度量。请迁移到 Bug Finder 以计算代码度量。
Polyspace 结果
主题
- 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.