JS shown, Rust used #182461
-
Select Topic AreaBug BodyThis repo is almosts entirely written in Rust, and the language bar shows Javascript instead. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
This isn’t actually a bug 🙂 GitHub determines the language breakdown automatically using a tool called Linguist. It scans the repository and calculates percentages based on file types and extensions, not on what the “main” implementation language is. Even if the project is almost entirely written in Rust, the presence of small .js files (for scripts, tooling, web assets, etc.) will still be detected and included in the language statistics. If JavaScript appears in the language bar, it simply means there are JavaScript files in the repository, not that the core application is written in JavaScript. You can even customize or override this behavior using a .gitattributes file if needed. So the language bar reflects file composition, not architectural intent. |
Beta Was this translation helpful? Give feedback.
GitHub doesn’t calculate the language bar by number of files. It’s based on the total number of bytes per language, as detected by Linguist.
That means a single large file can outweigh many small ones. It also ignores certain files depending on how they’re classified (vendored code, generated files, minified assets, etc.), and it may exclude directories like target/ or other build outputs automatically.
So if the percentages don’t seem to match a simple “file count” or “visible line count,” it’s usually because:
The calculation is byte-based, not file-based
Some files are excluded from statistics
Some files might be classified differently than expected
The language bar reflects re…