C++ 的静态代码分析器在Linux中
可能的重复:
有哪些开源 C++ 静态分析工具可用?
有人知道 Linux 中用于 C++ 代码的开源、良好的静态代码分析器吗? 这个想法是在代码进入代码审查状态之前捕获编程错误。 如果能够为该工具添加规则那就太好了。 有人知道这样的工具吗?
Possible Duplicate:
What open source C++ static analysis tools are available?
Does anybody know of an open source,good static code analyzer for C++ code in Linux ?
The idea is to catch programming errors even before the code goes in to the code review state.
It would be great to have the possibility to add rules the tool.
Does anybody know of such tool?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你可以尝试pvs-studio:
http://www.viva64.com/en/pvs -studio/ (1)
还有(bla-bla-lint):
http://www.gimpel.com/html/index.htm (2)
错过关于Linux的注意事项,
(2) 中的用于 C/C++ 的 FlexeLint 有 Linux 支持,
(1) 仅适用于windows,只有您的产品跨平台时才可以勾选。
you can give a try pvs-studio:
http://www.viva64.com/en/pvs-studio/ (1)
also there is (bla-bla-lint):
http://www.gimpel.com/html/index.htm (2)
missed note about linux,
FlexeLint for C/C++ from (2) has linux support,
(1) only for windows, you can check it only if your product crossplatform.
您还可以使用插件(用 C 语言编码)或 MELT 扩展(MELT 是一种用于扩展和自定义 GCC 的高级领域特定语言)。如果您有自己想要检查的编码规则,那么这种方法可能是合适的。然而,这确实需要一些工作。
You can also customize GCC (4.6) by using plugins (coded in C) or MELT extensions (MELT is a high-level domain specific language to extend and customize GCC). This approach could be appropriate if you have your own coding rules that you want to check. However, it does take some work.
看一下 clang 的静态分析器:http://clang-analyzer.llvm.org/
还有其他工具,例如 KLEE基于llvm,也可能值得一看。
Take a look at clang's static analizer: http://clang-analyzer.llvm.org/
There are other tools like KLEE based on llvm, might worth a look, too.