您使用什么工具进行静态代码分析? [英] What tools do you use for static code analysis?
问题描述
This question on Cyclomatic Complexity made me think more about static code analysis. Analyzing code complexity and consistency is occasionally useful, and I'd like to start doing it more. What tools do you recommend (per language) for such analysis? Wikipedia has a large list of tools, but which ones have people tried before?
编辑:正如David指出的那样,当涉及基于C / UNIX的工具。
As David points out, this is not a completely unasked question when it comes to C/UNIX based tools.
推荐答案
我一直在为我的Objective-C iPhone项目(iOS应用程序)建立一个Hudson持续集成(CI)构建系统,并编译了各种各样的工具,可用于在构建过程中分析我的项目:
I have been setting up a Hudson continuous integration (CI) build system for my Objective-C iPhone projects (iOS apps), and have compiled a varied list of tools that can be used to analyze my projects during a build:
-
Clang静态分析器:免费的,最新的独立工具,可以捕获比Xcode 4中包含的Clang版本。活动项目。 -访问 http://clang-analyzer.llvm.org
Clang static analyzer: free, up-to-date stand-alone tool that catches more issues than the version of Clang included with Xcode 4. Active project. -- visit http://clang-analyzer.llvm.org
Doxygen :免费的文档生成工具,还可以生成类依赖关系图。活动项目-访问 http://www.doxygen.nl
Doxygen: free documentation generation tool that also generates class dependency diagrams. Active project -- visit http://www.doxygen.nl
HFCCA (无头循环复杂度分析器):免费的Python脚本来计算代码复杂度,但没有头文件和预处理器。支持Hudson / Jenkins构建的XML格式输出。活动项目。 -访问 http://code.google.com/p/headerfile -free-cyclomatic-complexity-analyzer
HFCCA (header-free cyclomatic complexity analyzer): free Python script to calculate code complexity, but without header files and pre-processors. Supports output in XML format for Hudson/Jenkins builds. Active project. -- visit http://code.google.com/p/headerfile-free-cyclomatic-complexity-analyzer
CLOC (对代码行进行计数):免费工具来对文件进行计数,代码行,注释和空白行。支持差异化,因此您可以看到内部版本之间的差异。活动项目。 -访问 http://cloc.sourceforge.net
CLOC (count lines of code): free tool to count files, lines of code, comments, and blank lines. Supports diffing, so you can see the differences between builds. Active project. -- visit http://cloc.sourceforge.net
SLOCcount (源代码行数):这是一个免费的工具,可以对代码行进行计数并估算与项目相关的成本和时间。似乎没有激活。 -访问 http://sourceforge.net/projects/sloccount 和 http://www.dwheeler.com/sloccount
SLOCcount (source lines of code count): a free tool to count lines of code and estimate the costs and time associated with a project. Does not appear to be active. -- visit http://sourceforge.net/projects/sloccount and http://www.dwheeler.com/sloccount
AnalysisTool :免费的代码分析工具,可测量代码复杂性并生成依赖关系图。不活跃。似乎不能与Xcode 4一起使用,但是我很想让它工作。 -访问 http://www.karppinen.fi/analysistool
AnalysisTool: free code analysis tool that measures code complexity and also generates dependency diagrams. Not active. Does not seem to work with Xcode 4, but I would love to get it working. -- visit http://www.karppinen.fi/analysistool
这篇关于您使用什么工具进行静态代码分析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!