Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow LOC statistics for a whole repository #3131

cezarykluczynski opened this issue Jul 24, 2016 · 1 comment

Allow LOC statistics for a whole repository #3131

cezarykluczynski opened this issue Jul 24, 2016 · 1 comment


Copy link

@cezarykluczynski cezarykluczynski commented Jul 24, 2016

Currently, language statistics retrieved for a whole repository are calculated as a sum of blob sizes.

It would be a nice addition to have a high level API allowing retrieval of LOC statistics for a whole repository.

ruprict added a commit to ruprict/linguist that referenced this issue Aug 18, 2016
We wanted a quick way to get LOC/language for a repo, and linguist
had all the tools, but didn't offer it as a CLI flag. So, I added
it. :)

I did make an attempt at refactoring the linguist executable a bit,
added very simple presenters that can write to any IO object.

I hope you'll find this useful. Incidentally, it's mentioned as
a want in [Issue 3131](github#3131)
Copy link

@lildude lildude commented Dec 9, 2017

Linguist isn't designed to calculate the lines of code for an entire repository, and I'm not entirely sure it should be either. Yes, there is a measure of LOC of a file when checking an individual file, but it's not 100% accurate and I think that it's more of a "nice to have" than actual function of Linguist as it's not used for anything else.

If you really need to know the lines of code of an entire repo, there are much better tools for this than Linguist.

With this in mind, I'm closing this issue and the referenced PR. I'm happy to re-evaluate this decision if a good explanation for why we need this can be provided.

@lildude lildude closed this Dec 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.