Skip to content

line counting #306

Closed
Closed

Description

@bos

(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).

Activity

  1. bos commented on May 24, 2012

    @bos
    ContributorAuthor

    (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?

  2. bos commented on May 24, 2012

    @bos
    ContributorAuthor

    (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.

  3. jsl commented on Feb 24, 2015

    @jsl

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions