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

Closed
cezarykluczynski opened this Issue Jul 24, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@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

Adds support for Line of Code to the linguist executable:
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)
@lildude

This comment has been minimized.

Show comment
Hide comment
@lildude

lildude Dec 9, 2017

Member

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.

Member

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