* Paul Wise <p...@debian.org>, 2015-09-06, 14:38:
https://bugs.debian.org/782171
cloc looks at file extensions and shebangs (but it doesn't recognize Python or PHP shebangs...), and it has some heuristics to discern languages that use the same extension.
There doesn't seem to be currently an interface to print all files of selected language.
The source is a single monolithic (9KLOC) Perl script, which doesn't encourage me to write any patches for it.
In summary, it doesn't seem better than ack to me.
https://stackoverflow.com/questions/475033/detecting-programming-language-from-a-snippet
I would have a look at ohcount and linguist if they weren't written in Ruby. :>
-- Jakub Wilk