Ticket #313 (new enhancement)

Opened 5 months ago

Last modified 5 months ago

line counting

Reported by: igloo Assigned to:
Priority: normal Milestone:
Component: Cabal library Version: 1.2.3.0
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.8.2 Platform:

Description

It would be nice if Cabal had a way to do source line counting. Two programs I know of to do the hard work are sloccount http://www.dwheeler.com/sloccount/ and ohcount http://labs.ohloh.net/ohcount

I've also attached a small perlscript from the GHC source tree, but it has some drawbacks (most notably, only supporting Haskell).

Attachments

count_lines (1.4 kB) - added by igloo on 07/15/08 08:32:21.

Change History

07/15/08 08:32:21 changed by igloo

  • attachment count_lines added.

07/15/08 08:32:48 changed by igloo

  • type changed from defect to enhancement.

07/15/08 17:37:59 changed by duncan

Why do we want the Cabal lib to do this? I can see why we might want these stats on the hackage page, but do we need it elsewhere? If anything I guess it could go in cabal-install in some stats command.

What is the use case? What user interface might you expect?

07/16/08 04:55:32 changed by igloo

Cabal knows which files are source files. Just saying something like sloccount . will include generated files, e.g Parser.hs, and will also look at files under _darcs.