minexew / Shrine

A TempleOS distro for heretics
Other
1.48k stars 79 forks source link

added .gitattributes for HolyC detection by github-linguist #48

Closed James-Oswald closed 4 years ago

James-Oswald commented 4 years ago

I couldn't help but notice that linguist incorrectly classifies most of this repository as being C and C++ code, image

I saw issue #46 mentioned this problem, and it was brought up that this incorrect classification is due to the line // vim: set ft=c: at the start of .HC files. While removing this might fix the issue, it would also remove C highlighting from vim which is undesirable.

Rather, I wanted to test if adding a .gitattributes with *.HC linguist-language=HolyC would override the detection done by // vim: set ft=c:. Sure enough it does, and the repository can be classed as a HolyC repository without the need to remove // vim: set ft=c:.

image image

minexew commented 4 years ago

Excellent.