"Good PR" mechanical check

Martin DraĊĦar via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 12 05:42:11 PST 2016


Dne 12.1.2016 v 14:34 Andrei Alexandrescu via Digitalmars-d napsal(a):
> Related to https://github.com/D-Programming-Language/dlang.org/pull/1191:
> 
> A friend who is in the GNU community told me a while ago they have a
> mechanical style checker that people can run against their proposed
> patches to make sure the patches have a style consistent with the one
> enforced by the GNU style. I forgot the name, something like
> "good-patch". I'll shoot him an email.
> 
> Similarly, I think it would help us to release a tool in the tools/ repo
> that analyzes a would-be Phobos pull request and ensures it's styled the
> same way as most of Phobos: braces on their own lines, whitespace
> inserted a specific way, no hard tabs, etc. etc. Then people can run the
> tool before even submitting a PR to make sure there's no problem of that
> kind.
> 
> Over the years I've developed some adaptability to style, and I can do
> Phobos' style no problem even though it wouldn't be my first preference
> (I favor Egyptian braces). But seeing a patchwork of styles within the
> same project, same file, and sometimes even the same pull request is
> quite jarring at least to me.
> 
> Who would like to embark on writing such a tool?
> 
> 
> Thanks,
> 
> Andrei

Wouldn't it be sufficient to mandate usage of dfmt with proper settings
before submitting a PR?

Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3299 bytes
Desc: Elektronicky podpis S/MIME
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20160112/fe1e4d06/attachment-0001.bin>


More information about the Digitalmars-d mailing list