Closed ztmr closed 11 years ago
I am experiencing the same issue, but I also noticed recently that it will mis-detect erlang as Perl...
https://github.com/basho/luke for an example of this behavior.
Hm, it's strange that the problem still exists on some repositories because few weeks ago, it was fixed at least on the repository (http://github.com/ztmr/egtm) where I have discovered the issue for the first time. That's why I thought somebody silently fixed it in meantime...
Well, if the file doesn't have an extension, Linguist will classify it based on the result of a Bayesian analysis based on the tokens in lib/linguist/samples.json, so what language it (mistakenly) decides the blob is going to be depends on the frequency of the tokens in that particular file.
There are a few things that can be done to fix this bug and others of its type:
rebar
to lib/linguist/vendor.yml - Proposed as #443.rebar
recognized in a project, or if they should always be treated as vendor, and if so how that would be done in Linguist.This is fixed with #443, and the fix will be out on the website soon.
Escript bundle is a compressed Erlang script. Linguist detect it incorrectly as a JavaScript:
...so many Erlang projects that are shipped with rebar build tool script may be detected as JavaScript projects alghough they are pure-Erlang!