$ file ./rebar
./rebar: a escript script text executable
$ linguist ./rebar
./rebar: 0 lines (0 sloc)
mime type: text/plain
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...
Add Erlang rebar escript bundles to vendor.yml
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:
This is fixed with #443, and the fix will be out on the website soon.