[erlang-questions] LOC tool for Erlang

Ulf Wiger (TN/EAB) ulf.wiger@REDACTED
Wed Mar 5 15:36:03 CET 2008


Convey Christian J NPRI skrev:
> Does anyone know of an open source tool (hopefully without output in English) that counts lines of Erlang code?
> 
> Thanks,
> Christian

I have an old module (in need of cleanup) that counts lines
of code for Erlang, C and Java code, reporting lines of
code excluding comments+whitespace, lines of comments and
longest line. It also gives summaries per "block" (roughly,
application) in a text format suitable for Excel.

I've attached the source code. It uses a module called
sysFs.erl, which should correlate to filesystem.erl
(http://www.erlang.org/user.html#filesystem-1.0), but
could, with minor rewrites, be replaced by filelib.erl
in stdlib.

As you can tell, it was written long ago. It's been one
of those things that you just use, and keep patching if
it ever breaks. It's been useful, though.

BR,
Ulf W


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lcount.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080305/4174c9eb/attachment.ksh>


More information about the erlang-questions mailing list