3 ms·
GitHub's source code language detection is over there: https://github.com/github/linguist/tree/master/lib/linguist https://github.com/github/linguist/tree/mast
by Tobu 15y ago
GitHub's source code language detection is over there:
https://github.com/github/linguist/tree/master/lib/linguist https://github.com/github/linguist/tree/master/lib/linguist
It doesn't measure line length, which could be a good way to detect minified JavaScript. It uses file extensions and byte size. There is some exclusion of commonly bundled libraries, but it's a rough heuristic on file paths.