haghish / github

a module for building, searching, installing, managing, and mining Stata packages from GitHub
http://haghish.github.io/github/
101 stars 41 forks source link

Fix yesterday's typo and create .gitattributes with some additional Linguist settings #20

Closed remlapmot closed 3 years ago

remlapmot commented 3 years ago

The settings in the .gitattributes file control the languages reported by the Languages pane of the repo.

Currently Linguist assigns .do, .ado, .doh, .ihlp, .mata, .matah, and .sthlp to Stata, which I get from here

https://github.com/github/linguist/blob/971e152fabca12e0ad386833eecb7b15e312a09f/lib/linguist/languages.yml#L5825-L5838

so these settings just assign some additional file extensions to Stata.

haghish commented 3 years ago

thank you!

remlapmot commented 3 years ago

My pleasure.

There are a few Stata related file extensions which Linguist has assigned to other languages; other namely .toc which it assigns to TeX (fair enough as that's in much more common use) but in our repos that's for Stata.

E.g. Languages pane used to incorrectly show TeX; image

Confusingly these settings only affect the Languages pane on the main page of a repo; when you click on the language and go through to the search page Linguist seems to ignore these settings.