This metric measures the number of comment lines for each file.

Whilst the absolute number of comment lines in a file may not provide much useful information out of context, a very small number of comments in a file may indicate either a potentially worrying lack of documentation or that the file was generated by an automated tool - a quick visual inspection should be sufficient to distinguish between the two cases.

If the file is not an auto-generated one, it should be documented at the first convenient opportunity (i.e. now). We note in passing that:

  • S. McConnell. Code Complete, 2nd Edition. Microsoft Press, 2004.