scitools.com

← Metric catalog

Comment to Code Ratio is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.

Comment to Code Ratio

API ID: RatioCommentToCode
Languages: Ada, Assembly, Basic, C#, C++, Fortran, Java, Jovial, Pascal, Python, Rust, VHDL, Web
Targets: Architectures, Classes, Files, Functions, Modules, Packages, Project, Subprograms

Ratio of comment lines to code lines.

Note that because some lines are both code and comment, this could easily yield percentages higher than 100.


Targets By Language: Configuration: