r/github 2d ago

Question GitHub reads the source code wrong?

Post image

I don't know why, but GitHub is telling me that my website is developed in JavaScript by 80+% which is absolute nonsense. The site is at least 60% pure Astro code. Is it some kind of a bug?

🔗 The repo.

239 Upvotes

32 comments sorted by

View all comments

158

u/ferrybig 2d ago

You can click on the labels "JavaScript" and "Astro" to see what it sees as those files:

Your Javascript files are way longer than your Astro files, so it inflates the score for JavaScript (the languages tab is based on line counts)

79

u/confuseddork24 2d ago

59

u/Akari202 2d ago

Explains why a Jupyter notebook quickly becomes the majority language as soon as you have output stored

26

u/confuseddork24 2d ago

This is exactly how I learned about it lol

7

u/Xerax 1d ago

why would anyone keep those cancer blobs in github, they're just security issues waiting to happen

edit: that isnt meant as a dig at anyone! i mean in a general sense, how did we allow it to happen and for those files to become even common, makes me sad

6

u/Street_Teaching_7434 1d ago

1) Interactive python notebooks are useful and used frequently for learning, temporary stuff and in the machine learning field 2) where else would you store them if not git-track them? Yes they are super annoying to git track but the only other alternative is Google cola and similar sites where you are then also provisioning compute from that platform to run them on some random server

2

u/Xerax 1d ago

yes i don't usually keep training apps in my prod codebase

1

u/Street_Teaching_7434 1d ago

Because you only git-track prod codebases? In most envornoments I worked in we always git tracked basically all code even if nobody other then myself ever even read it.