Sloccy is a source-lines of code CLI tool. Given a path, it'll read all the files in that directory and its subdirectories and figure out how many non-whitespace characters and lines are in each, and then calculates a "score" based on the expected average characters-per-line and number of characters.
-hflag will print a help message-vwill print the current version-swill exclude subdirectories-nwill print without color (see./build)-lwill count only\nas linebreaks-rwill reset the configuration file-cwill print the configuration
The configuration file is a basic text file that contains
a list of Language-Families, and then the extensions
that belong to that family. Each Language-Family is separated
by a ; character, and each extension or name is separated
with whitespace.
- custom values for
lineScalarbased on the language. probably get the scores for each language by downloading a bunch of very large samples and seeing what the average char/lines is - custom colors for each language
- updating a directory's
readme.mdwith sloccy badges using ghloc
- comments and empty lines do not affect the count
- the last line in the config, if there isn't a space after the last entry, will interpret it as having one less entry than it should
- the
strncmpfunction being used incorrectly returnstruefor strings of mismatched length such as.readmeand.rsince the first parts do match. It also completely ignores thelenargument. Tried a couple fixes and had no luck so far, so coming back to it later
C 263 pts 9 files, 679 linebreaks, 12k chars
R 43 pts 1 files, 56 linebreaks, 2k chars
Text 52 pts 3 files, 117 linebreaks, 2k chars
Total 358 pts 13 files, 852 linebreaks, 17k chars
