Documentation

loccount – count source lines of code in a project

loccount is a re-implementation of David A. Wheeler’s sloccount tool in Go.

It is faster, handles more different languages, can report LLOC as well as SLOC, and can do COCOMO II as well as COCOMO I estimates. Because it’s one source file in Go, it is easier to maintain and extend than the multi-file, multi-language implementation of the original.

The algorithms are largely unchanged and can be expected to produce identical numbers for languages supported by both tools. Python is an exception; loccount corrects buggy counting of single-quote multiline literals in sloccount 2.26.

This is free and open source software.

Website: gitlab.com/esr/loccount
Support:
Developer: Eric S. Raymond
License: BSD License

loccount is written in Go. Learn Go with our recommended free books and free tutorials.

loccount in action


Related Software

Alternatives to cloc
TokeiDisplays statistics about your code
sccFast accurate code counter with complexity calculations and COCOMO estimates
SLOCCountSet of tools for counting physical Source Lines of Code
goclocA compact fast cloc tool seeking inspiration from Tokei
loccountRe-implementation of David A. Wheeler’s sloccount tool in Go
locRust implementation of cloc, but it’s more than 100x faster
tcountCount your code by tokens and patterns in the syntax tree
slocSimple tool to count source lines of code written in CoffeeScript
polyglotCommand-line tool that determines project contents
enryProgramming language detector based on go-enry
LinguistAssess a repository’s languages stats with github-linguist executable
CLOCTUITUI for CLOC

Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Know a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments