Skip to content

GreenRaccoon23/gosloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gosloc

Install

go get -u github.com/GreenRaccoon23/gosloc;

Download

git clone https://github.com/GreenRaccoon23/gosloc.git;

Description

Command-line program to count source lines of code quickly.

Mostly works, but still in development.

[hiro@nakamura ~]$ gosloc -h;
gosloc <options> <path>...
  -i, --include string    File patterns to include, separated by commas
  -x, --exclude string    File patterns to exclude, separated by commas
  -c, --concurrency int   Max number of files to read simultaneously (default 1)
  -t, --total             Show a grand total, not the total for each file

WARNING: Setting concurrency too high will cause the program to crash.

Written in Go.

Binaries

I have compiled (but not tested) binaries for different platforms:

If you have Go installed, it is easier and more efficient to install this package with the install command. I added these binaries because I wanted to see if I could figure out how to make them.

There are no Android binaries because I have not figured out how to make them yet. I doubt anyone would want to run this program on an Android device anyway.

Why

Similar tools I found were painfully slow, required awkward workarounds, and/or did not include everything I needed for my use cases. So I wrote this instead.

It is much faster than the other tools I have tried. It processes about 5000 files a second on a laptop which was considered mid-range performance 7 years ago.

About

Count source lines of code fast

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published