Github incorrectly recognizes programming language used in the project

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.


You could create a file .gitattributes to set GitHub's Linguist overrides.

To set your C++ files to be detected as C++ by extension:

*.h linguist-language=C++
*.cpp linguist-language=C++

To ignore generated files and don't show them in diffs:

generated/*.d linguist-generated=true

Also, you can mark some files as undetectable, if the language is not on the known languages list:

*.t linguist-detectable=false

Tags:

C++

D

Github