I actually much prefer BitBucket's way of doing things, for exactly this reason. It doesn't even try to detect - it just asks me. Sometimes the simplest solutions are the best.
Re:GitHub's language detection is broken
by michaelmior on Friday March 14, 2014 @08:55AM
(#7398390)
Language detection as discussed in the link is per-file. I don't think overriding individual files makes sense since it's likely to be more trouble than it's worth. But I can understand the desire to change the detected language of the project.
Re:GitHub's language detection is broken
by Allan_Smithee on Friday March 14, 2014 @10:01AM
(#7398729)
How 'bout a project-specific property list that looks something like this:
.rb=RealBasic .m=Mercury .pl=Prolog .js=SomeCrapOrOther …
Re:GitHub's language detection is broken
by michaelmior on Friday March 14, 2014 @12:21PM
(#7399858)
Seems like more effort than it's worth still to deal with project-specific settings. AFAIK the only two things this practically affects is syntax highlighting and repository stats. That approach would be a good tradeoff though if things are important enough.
For example, I've got a javascript modules in repositories. For each module, I make a demo version to show what the module does, and that demo includes a bunch of css. Apparently, there is more css than their is Javascript, so GitHub labels the module as css, but the important part isn't css, the important part is the javascript. In order to resolve this, I've had to move the css into a different repository, and ignore it in the javascript repository. Seems like a long way around, when all I want to do is correct them and say that the module is actually a javascript module.