Hacker News new | ask | show | jobs
by eXpl0it3r 4481 days ago
I can agree that the detection is broken. C++ gets often recognized as C. PHP with some CSS file gets recognized as mostly CSS, etc.

Personally I'd like to have a fixed language that I can set and that the search will use. Next to that, it would be fine for me to statically show what the repository contains, but please use a better language detection, just going by extensions is quite naive.

1 comments

> C++ gets often recognized as C.

The disambiguation test for C++ headers is ridiculous:

      matches << Language["C++"] if data.include?("#include <cstdint>")
Well, I expect that's why so much C++ is misrecognized. Not enough people write valid C++, in Github's narrow world view. :)