"Good PR" mechanical check
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jan 12 05:34:25 PST 2016
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
More information about the Digitalmars-d
mailing list