D source code formatter

Seb seb at wilzba.ch
Thu Feb 22 07:00:27 UTC 2018


On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit 
wrote:
> I rely (heavily) on clang-format in my C code. It save me so 
> much effort and has become a vital day to day tool for me.
>
> I was wondering whether D also has a 'reliable' source code 
> formatter.
> (reliable being a key word there).
>
> Also, if it does, then why is it not included in the 
> distribution - given the importance of consistent source code 
> formatting these days.

See https://github.com/dlang-community/dfmt/issues/249 for why it 
was never included in the release distribution.

In short: Brian was never really interested in packaging and 
investing time into releasing his tools, so it stalled. Now that 
dub is part of the release distribution, it's simply:

dub fetch dfmt
dub run dfmt

So there's essentially no big need to ship it in the release 
archives.
Though Sociomantic has recently taken over the release process of 
dfmt and currently provides APT packages at bintray:

https://bintray.com/dlang-community/apt/dfmt


More information about the Digitalmars-d mailing list