Linguist syntax highlighting for Drupal file types
Drupal uses a few unusual file extensions that contain PHP - notably
GitHub use linguist for language detection. You can configure linguist using a
.gitattributes file in your repo.
.gitattributes file with the following contents to your Drupal repo:
# linguist configuration for syntax highlighting in github UI. *.module linguist-language=PHP *.install linguist-language=PHP *.theme linguist-language=PHP
Now your pull requests and source viewer in Github should have PHP syntax highlighting for these file extensions.