code quality metrics (resource standard management)

RSM是一款不错的静态代码质量检查工具,提供代码行数统计,复杂度统计等功能,具体见:http://msquaredtechnologies.com/m2rsm/docs/index.htm

RSM supports the language syntax of ANSI C, ANSI C++, C# and Java.

RSM creates HTML reports for Visual Metrics that interacts with source code hyperlinks and CSV or comma separated value format for direct input to MS Excel or other spreadsheets.

feature:

  • Number of public, private, protected data attributes
  • Number of public, private, protected methods
  • Template Type
  • Inheritance
  • Depth of Inheritance Tree Example
  • Number of derived child classes per base class
  • LOC Lines of Code
  • eLOC (Effective LOC)
  • lLOC (Logical Statements LOC)
  • Comments Lines
  • Blank Lines
  • Physical Lines
  • Number of Input Parameters
  • Number of Return Points
  • Interface Complexity (Parameters + Returns)
  • Cyclomatic Complexity Logical Branching
  • Class Complexity (Interface + Cyclomatic)
  • Class Quality Analysis RSM Quality Analysis

source monitor也有类似功能,好处是免费,坏处是只支持windows。

sonar也是不错的代码质量衡量工具,但是当前对C++的支持还不够好。

原文地址:https://www.cnblogs.com/raymondshiquan/p/2114342.html