So I have a git repository that I wrote in C++, but github insists that I'm using D. Why is this and is there someway to correct it?
GitHub uses the open source Linguist library to determine file languages for syntax highlighting and repository statistics. Language statistics will update after you push changes to your default branch.
You cannot change the language of the repository, but you can change the attributes of the github repository. I mean that if you have a project where there are 60% css and 40% javascript you can said to github-linguist, that you want to ignore the css file. this attributes ignore the java files.
Github uses it's own language parsing module and sometimes (actually often) it makes faults. Just write more code to make it easier for parser to choose what your main language is and after some time github will get it right.
In this particular case code parser is fooled by your files in STMC-C/Assignments/a*
dirs with .d
extension. That's an extension for D sources. The number of this sources dominated in your project so github decided that the main programming language used is D.
edit: Just found this public repo (github language detector) - it has some explanations of the system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With