GitHub detects .d source as Makefile?

David Nadlinger via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 17 18:33:13 PDT 2017


On Saturday, 18 March 2017 at 00:34:57 UTC, XavierAP wrote:
> 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?

The extension .d can legitimately refer to makefiles as well 
(specifically, to dependency files).

The code GitHub uses to infer source file languages is 
open-source, and – fittingly – available on GitHub: 
https://github.com/github/linguist

You should check the issues for reports of similar D-related 
problems, and if there are none, create a new one. Or, better 
yet, submit a pull request with an appropriate fix.

As a workaround, adding a "module …;" declaration to your file 
should help. You probably want to be doing that anyway.

  — David


More information about the Digitalmars-d-learn mailing list