Windows 命令行的官方文档非常清楚 - 返回代码是一个位掩码,每个位都意味着什么,特别是代码“256”表示“在源代码中发现了一些问题”。
对于 Linux 命令行操作,我可以通过以下方式获取此帮助信息pvs-studio-analyzer --help
pvs-studio-analyzer state codes that form a bit mask exit code are:
0 - Analysis was successfully completed, no issues
were found in the source code;
1 - Preprocessing failed on some file(s);
2 - Indicates that analyzer license will expire in
less than a month;
3 - Analysis was interrupted;
4 - Error (crash) during analysis of some source file(s);
5 - Indicates that analyzer license has expired;
6 - License expiration warning suppression flag was used
with non-expiring license;
首先,这些代码不能形成有效的位掩码,它们不是 2 的幂!
其次,没有特定的返回码表示“在源代码中发现了一些问题”,我对此特别感兴趣——因此没有明显的方法来检查是否发现了任何问题(并以某种方式对其作出反应)。
第三,我在官方文档中找不到任何关于 Linux 上的返回码的信息。
所以,我的问题是 - 这个帮助信息正确吗?如果是,我如何检查是否发现了任何问题?