[erlang-questions] LOC tool for Erlang

Convey Christian J NPRI ConveyCJ@REDACTED
Wed Mar 5 16:09:03 CET 2008


Thanks.  The grep idea was my fall-back plan, but I noticed that some tools count "logical" lines of code as well, which helps erase the effects of different coding linebreak styles.

- Christian

> -----Original Message-----
> From: Daniel Luna [mailto:luna@REDACTED] 
> Sent: Wednesday, March 05, 2008 10:04 AM
> To: Convey Christian J NPRI
> Cc: erlang-questions@REDACTED
> Subject: Re: [erlang-questions] LOC tool for Erlang
> 
> On Wed, 5 Mar 2008, Convey Christian J NPRI wrote:
> > Does anyone know of an open source tool (hopefully without output in
> > English) that counts lines of Erlang code?
> 
> grep, wc and find are your friends.
> 
> But the answer depends on what you mean with lines of Erlang code.
> 
> All lines:
> 
> wc -l $(find . -name "*rl")
> 
> Lines that are not blank lines or comments:
> 
> grep -v '^[[:space:]]*\($\|%\)' $(find . -name "*rl") | wc -l
> 
> /Luna
> -- 
> Daniel Luna                           | Top reasons that I 
> have a beard:
> luna@REDACTED                     |  a) Laziness.
> http://www.update.uu.se/~luna/        |  b) I can.
> Don't look at my homepage (it stinks).|  c) I can get away with it.
> 



More information about the erlang-questions mailing list