Dmitry
Dmitry

Reputation: 1

Trying to Override the Linguist attributes on GitHub - TeX language

Git hub has detected my repo to contain mostly TeX Language which is incorrect, it is mostly written in Python with the exception of a couple of .spec files.

GitHub Language calculation:

I understand that I have to use a .gitattributes file in order to set the attributes, so far I have managed to get rid of the other languages but can't seem to get rid of the TeX one.

I couldn't find any answers that specifically resolve TeX but I came across this article (Override GitHub Linguist with gitattributes files) that says to use this line in the .gitattributes file:

tex/* linguist-vendored

So far this is what's in my file but of course, it's not working, Does anyone have any ideas or have come across this?

*.css linguist-detectable=false
*.java linguist-detectable=false
*.python linguist-detectable=true 
*.js linguist-detectable=false
*.html linguist-detectable=false  
*.xml linguist-detectable=false 


tex/* linguist-vendored

https://github.com/D-Games/Controller-Detection

Upvotes: 0

Views: 162

Answers (1)

pchaigno
pchaigno

Reputation: 13198

tex/* linguist-vendored is just an example. You need to provide the actual path to the files you want to ignore.

In your case, you want:

*.toc linguist-vendored

You can see which files are detected as TeX, with the query https://github.com/search?q=repo%3AD-Games%2FPS5-Controller-Detection++language%3ATeX&type=code. Your .toc files are detected as TeX files because that is a registered TeX file extension.

Upvotes: 0

Related Questions