flosse / sloc

simple tool to count SLOC (source lines of code)
MIT License
947 stars 84 forks source link

Split stats/counts up by language? #42

Open metasoarous opened 9 years ago

metasoarous commented 9 years ago

The (perl?) cloc (count lines of code) tools does some nice table based breakdowns by language. For multi language projects this could be nice to get a better sense of what the distribution is. cloc rather sucks in it's language support and is annoying to extend. I applaud your tool for being so much easier to work with :-)

flosse commented 9 years ago

I like this idea :) thx.

flosse commented 9 years ago

I just added a basic implementation for that (try the cli-table formatter).

flosse commented 9 years ago

What do you think, should we group by language or by extension or do we add an option for that? By default it might be enough to know the language but in some cases it could be interesting to separate by extension like C vs. c and h.

metasoarous commented 9 years ago

Awesome! Glad you're stoked on it. I'll check it out soon.

I think doing it by language should be the default, since I'm guessing that's what most people would want to know (and is typically what I'd want). However, sometimes you might want a Rakefile or SConstruct to be counted separately from other Ruby/Python files (respectively), so I could see extension being a nice addition; As you mention, separating out header files would be nice as well. And those Rubyists (and some others) can be a little weird with using different extensions for different things. So yes, good thinking on an option for that.

Cheers