Your GitHub language bar is lying (how to fix it) 0 ▲ Michael Kennedy's Thoughts on Technology 1 hour ago · Tech · hide · 0 comments tl;dr; GitHub’s language bar counts every byte in your repo, including generated docs and test suites. A few lines in .gitattributes tell it what to skip. For my project, that took it from “75% HTML” to roughly 62% Rust and 38% Python, which is what the project really is. You know that colorful bar on every GitHub repo’s page, the one that says what the project is written in? I just learned you can tell it what to count. On one of my projects, it made a big difference. Why does GitHub think my Rust project is HTML? My project chameleon-rs is a Rust re-implementation of the Chameleon template engine, shipped as a Python package (I wrote about it here). Most of the engine is Rust, with a Python layer for the public API and framework integrations. Here’s what GitHub said it was: HTML: 75.5% Python: 12.4% Rust: 9.1% JavaScript: 2.8% HTML? Three quarters of it? There’s barely any hand-written HTML in the whole repo. Yes, it’s a templating engine, but the templates live in the tests and… No comments yet. Log in to reply on the Fediverse. Comments will appear here.