scitools.com

← Metric catalog

Comment Lines 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 Lines

API ID: CountLineComment
Also Known As: Comment Lines of Code (CLOC)
Languages: Ada, Assembly, Basic, C#, C++, Fortran, Java, Jovial, Pascal, Python, Rust, VHDL, Web
Targets: Architectures, Classes, Files, Functions, Modules, Packages, Project, Subprograms

Number of lines containing comment.

This can overlap with other code counting metrics. For instance:

int j = 1; // comment

has a comment, is a source line, is an executable source line, and is a declarative source line.

Also known as Comment Lines of Code (CLOC).


Targets By Language: Configuration: