GitHub detects .d source as Makefile?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 17 18:22:04 PDT 2017


On Saturday, March 18, 2017 00:34:57 XavierAP via Digitalmars-d-learn wrote:
> So I have put my first code even on GitHub (comments welcome :))
> and GitHub seems to detect the wrong language, even if I'm not
> familiar with this GH feature.
>
> https://github.com/XavierAP/etc/tree/master/heatsim
>
> The repository itself ("etc") is flagged as been written in
> Makefile? Right now I have only two source files (and a couple of
> images and a pdf). If I look at syntax highlighting online, one
> of them main.d seems highlighted in D ok. But the other one
> heatsim.d is not correctly highlighted.
>
> https://github.com/XavierAP/etc/blob/master/heatsim/src/heatsim.d
> https://github.com/XavierAP/etc/blob/master/heatsim/src/main.d
>
> Is this a known issue with D on GitHub? Should I report it I
> guess?
> How smart is GH that it doesn't look at the file extension? What
> happened?

I don't know what to say about that. It certainly seems odd, but I have no
idea how github decides such things. On bitbucket, you tell it the language
explicitly, which sidesteps the whole problem.

You might try what Walter likes to suggest and put

// Written in the D programming language

at the top of your D source files and see if that helps.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list