Skip to content

linguist-generated=true vs. sloc count #6595

Discussion options

You must be logged in to vote

I'm not sure why you'd want to do this as Linguist doesn't use LOC when determining the language proportions, it uses bytes of code (the second column in your first output).

From How Linguist works:

The percentages are calculated based on the bytes of code for each language as reported by the List Languages API.

You can see Linguist is ignoring those files you've marked as generated if you use the --breakdown flag:

github-linguist --breakdown ./unipoints/
99.97%  61531      PHP
0.03%   20         Batchfile

PHP:
.php-cs-fixer.php
bin/unipoints
build/BlocksBuilder.php
build/BlocksBuilder/Block.php
build/CodepointsBuilder.php
build/CodepointsBuilder/Codepoint.php
build/CodepointsBuilder…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@szepeviktor
Comment options

Answer selected by szepeviktor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants