Repository language(s) detection not working #22788
-
My repository has octave/matlab and Makefiles files. None of them are recognized by Github (repo information say nothing about those languages and text editor/viewers don’t have color syntax). What should I do in order to allow that? I worked in a lot of projects, I have never faced this problem with other programming languages. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It’s hard to give a specific answer here, I have repositories where both are recognized correctly. What I can say is: Github uses Linguist to detect the languages of your files. The README contains a lot of details on how it detects languages and troubleshooting options. And if after that it looks like a bug you can open an issue there. github/linguistLanguage Savant. If your repository's language is being reported incorrectly, send us a pull request! - github/linguist |
Beta Was this translation helpful? Give feedback.
-
Thanks for your quick answer @airtower-luna. I will read the README file before reporting a bug. Thanks again 😀 |
Beta Was this translation helpful? Give feedback.
-
The only way github linguitst detects a matlab/octave file (besides the extensions .matlab/.m) is if the file includes comments that starts with % (my files use the recommended # for octave). Check this file for more information: github.comgithub/linguist/blob/3d39c1c1a0d34c1af890ecfd18cf9ed595c68132/lib/linguist/heuristics.yml#L271
I changed all the comments in my source files and now Github detects the repository language as MATLAB. Maybe a pull request for the mentioned file in order to correct the regex will be the best solution. |
Beta Was this translation helpful? Give feedback.
The only way github linguitst detects a matlab/octave file (besides the extensions .matlab/.m) is if the file includes comments that starts with % (my files use the recommended # for octave). Check this file for more information:
github.comgithub/linguist/blob/3d39c1c1a0d34c1af890ecfd18cf9ed595c68132/lib/linguist/heuristics.yml#L271