Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LoC (lines of code) metrics for Delphi?

Tags:

delphi

How can I generate LoC (line of code) metrics for my Delphi (pascal) project? Is there a built-in way to do this?

like image 333
utku_karatas Avatar asked Sep 14 '09 11:09

utku_karatas


2 Answers

I don't use them. LOC metrics have one problem: they encourage writing code like this.

like image 166
azheglov Avatar answered Oct 05 '22 02:10

azheglov


Recent Versions of Delphi, from Pro and Up, include some basic metrics, including LOC metrics, and other similarly useless metrics, as built in feature. Enterprise and Architect include a larger set of metrics, and audits.

Notably the results are displayed in an inscrutable mess of a grid, with no help and no hints.

enter image description here

In fact, there's nothing in the help to help you either. However before you run the metrics, there is some description of what the various cryptic things mean, here is a list of the free built in ones:

CIW - Class Interface Width

LOC - Lines of Code

NAM - Number of Accessor Methods

NOA - Number of Attributes

NOC - Number of Classes

NOIS - Number of Import Statements

NOM - Number of Members

NOP - Number of Parameters

NOPA - Number of Public Attributes

PIS - Package Interface Size

PS - Package Size
like image 42
Warren P Avatar answered Oct 05 '22 00:10

Warren P