Closed gnzlbg closed 6 years ago
Hadn't seen this, definitely looks interesting. I'll have to look at what they do for figuring out filetypes when there's no extension as well.
from what i can tell poly doesn't handle multi-line comments, so only checking for // and not / / pairs in c for example, so it's doing less work there
it's really making me want colorful output
I personally find the colorful output overkill for a line counting tool, but I can personally recommend the termcolor crate used by ripgrep - it is really nice.
From: https://github.com/vmchale/polyglot
It might be interesting to look at which optimizations they are using.