主要内容

使用 WindowsLinux 脚本进行 Bug Finder 分析

使用批处理文件 (.bat) 或 shell 脚本 (.sh) 检查 C/C++ 代码中是否存在缺陷

使用 Windows® 或 Linux® 脚本配置并运行 Polyspace® 分析。了解可用的系统命令,并学习如何从命令行使用这些命令来运行 Polyspace。

为免于键入命令的完整路径,请将路径 polyspaceroot\polyspace\bin 添加到您操作系统上的 Path 环境变量中。其中,polyspaceroot 是 Polyspace 的安装文件夹,例如,C:\Program Files\Polyspace\R2026a。另请参阅安装 Polyspace 桌面端产品

Polyspace 选项

全部展开

-h | -help在命令行上显示静态分析选项列表
-doc | -documentation在 Web 浏览器中显示 Polyspace 文档
-list-all-values显示给定命令行选项的有效参量
-ver显示 Polyspace 产品的系统信息
-v | -version显示 Polyspace 版本号
在代码验证结束后要应用的命令/脚本 (-post-analysis-command)Specify command or script to be executed after analysis
-options-file使用选项列表运行 Polyspace
-results-dirSpecify the results folder

系统命令

polyspace-bug-finder(系统命令)对 WindowsLinux 或其他命令行运行 Bug Finder 分析
polyspace-comments-import(System Command) Import review information from previous Polyspace analysis
polyspace-configure(系统命令)从 DOS 或 UNIX 命令行中的编译系统创建 Polyspace 工程
polyspace-report-generator(系统命令)从本地或 Polyspace Access 上存储的 Polyspace 分析结果生成报告。
polyspace-results-export(系统命令)将 Polyspace 结果导出为 CSV 或 JSON 等外部格式
polyspace-project -diff, polyspace-project -merge(System Command) Compare and merge Polyspace Platform projects, workspaces, configurations and tests before submission to source control
polyspace-project -convert-psprj-to-workspace(System Command) Convert Polyspace project file to Polyspace Platform workspace file and project files
polyspace-project -generate-launching-script-for(System Command) Generate files needed to run static analysis on a Polyspace Platform project

主题