Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Allow LOC statistics for a whole repository #3131
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)
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.