(Imported from Trac #313, reported by @igfoo on 2008-07-15)
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).
(Imported comment by @dcoutts on 2008-07-15)
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?
(Imported comment by @igfoo on 2008-07-16)
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.
Given that there is no activity since 2008, I propose we close this issue. Please re-open or create another ticket if this is still desired. /cc @tibbe