Count source lines of code (SLOC) and logical lines of code (LLOC).
This is a faster implementation (in Go) of David A. Wheeler's sloccount tool. It can count LLOC as well as SLOC and handles a wider spread of languages, as well.
| TODO | to-do file |
| COPYING | project license |
| loccount-2.17.tar.gz | gzipped source tarball |
| README.html | roadmap file |
| hacking.html | Documentation |
| loccount.html | Documentation |
| NEWS.html | project news |
| design-notes.html | Documentation |
| references.html | Documentation |
The project repository is at https://gitlab.com/esr/loccount.
This code is usually packaged as 'loccount'.
If you appreciate this code (and especially if you make money by using it) please support me on Patreon.
Code hardening by ChatGPT 5.2
New -t option describes languages matching a regular expressuon.
Skip unreadable files; correctly classify files with 0 SLOC
Language names can now have embedded spaces.
More exclusion extensions.
Ignore files with an embedded NUL in the first 1K.
Improved behavior of Go files with syntax errors.
Suppress following symlinks in code trees.
Fixed incorrect occam file extension.
507 languages and markups supported.
This work is funded by...
My Bronze supporters: Martin Hohenberg, Jae Yang, Daniel Garber, Kyle Burkholder, Mike Nichols, Mark Ping, Tom Taylor, Arnold F. Williams, George Brower, Michael Nygard, Brendan Long, Sven Dowideit, Dave Witten, Jonathan Cast, James Cronin, David L. Jessup, Christopher Chang, Killer Delicious, Jacob Lyles, Neil Anuskiewicz, Mordant, Clemens Ladisch, Wojciech Woytniak, Masa Bando, John Carmack, Xingyu Wang, Jane Tang, Steven Evans, Jan Roudaut, Hsueh Sung, Ken LaCrosse, taishi28012, John Simpson, Jerod Tufte, Paul Abbott, Stan Witherspoon, Donald Greer, Gratiela Chergu, Michael Ciagala, Dale Carstensen, Chip Davis, Liudmilla Karukina, Jim McCloskey, Dewey Sasser, Hal Hildebrand, Connor Wood, Ken Kennedy, darrin, Mark Gardner, William Christensen, Malcolm Ocean, Rod Davenport, Nodarius Darjania, Cheryl Evry, Wenfeng Liang, Irving Rivas, Bill Soistman, ReallyBored, Άρης Δάσος, Ron Lauzon, TheFred, Paul Theodoropolous, Doug Phillips, Les Vogel, Matt Pollard, Andres Cordova, Umgeher Torgersen, Syeed Ali, Raghu Veer Dendukuri, Perry The Cynic, Gustav A Wirth, Mitchell Bryant, Matt Krueger, Jim Mog, John D. Taylor.
My Institutional supporters: Jason Azze and the DEVOPS team at his $DAYJOB, Christoph Happle, Symmetry Investments, Willam Duff, Mark Atwood, Caleb LaVergne, zariah mccall.
Or contribute via SubscribeStar.