3 ms·
> an automatic language detection model that the developer has zero control over Pull requests welcome :) https://github.com/github/linguist https://github.co
by thedaniel 13y ago
> an automatic language detection model that the developer has zero control over
Pull requests welcome :)
https://github.com/github/linguist https://github.com/github/linguist
- chimeracoder 13y agoI've seen that, and this is the corresponding issue: https://help.github.com/articles/my-repository-is-marked-as-the-wrong-language https://help.github.com/articles/my-repository-is-marked-as-.... Looking at vendor.yml, I'm actually not sure why this is happening. The repository I linked to above only has two files that end in .js: bootstrap.js and bootstrap.min.js[0], and only one that ends in .css (bootstrap.css). Unless I'm misreading the regex in vendor.yml, it seems like they should be excluded[1] but they aren't, and this isn't the only project of mine for which this is happening. I'm fairly certain it's picking up those files and not miscategorizing the Go files for some reason, because when I delete those files and instead serve the CSS/Javascript from a public cache, it categorizes the repository correctly, as is the case with this project (based off of go-server-bootstrap): https://github.com/ChimeraCoder/pluto https://github.com/ChimeraCoder/pluto [0] https://github.com/ChimeraCoder/go-server-bootstrap/tree/master/public/static/bootstrap/js https://github.com/ChimeraCoder/go-server-bootstrap/tree/mas... [1]https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml#L34 https://github.com/github/linguist/blob/master/lib/linguist/...
- coyotebush 13y agoSo the jQuery regex, for comparison, is (^|/)jquery([^.]*)(\.min)?\.js$ while the Bootstrap regex in question is (^|/)bootstrap([^.]*)(\.min)\.(js|css)$ with the ".min" not optional. (Looks like this was the intent [1]). The 68.9%/26.5% percentages match the 130k/50k ratio of bootstrap.css to bootstrap.js, so it looks like only bootstrap.min.js is being excluded? [1] https://github.com/github/linguist/commit/d5002ef06a9f3463919a3fe8919844c3aea46fc0 https://github.com/github/linguist/commit/d5002ef06a9f346391...
- chimeracoder 13y agoThanks for pointing that out. You're right - it does seem like it was intentional. I filed an issue for this though just in case, and perhaps they'll explain the reason: https://github.com/github/linguist/pull/856 https://github.com/github/linguist/pull/856