3 ms·
Is there a quick way to find out your LOC in a python project? Does it include whitespace and comments? What about HTML and JS code?
by collyw 8y ago
Is there a quick way to find out your LOC in a python project? Does it include whitespace and comments? What about HTML and JS code?
- rusk 8y agoThe typical measure is “Source Lines of Code” (SLOC), which would be calculated on a per-language basis and doesn’t include comments or blank lines. You’d sum these together for your codebase overall. Not sure how you’d do it for HTML or mixed code. Presumably the same since it’s such a rough measure that that level of accuracy really doesn’t matter.
- sacado2 8y agoI'm using tokei for that. EDIT: it gives you the number of lines of code, blank lines and comment lines, for each language in your project.
- shermanyo 8y agocloc is another commonly used package. It handles multiple languages and has a nice, readable output format.