Re: "Good PR" mechanical check

2016-01-13 Thread Andrei Alexandrescu via Digitalmars-d
On 1/13/16 12:19 AM, H. S. Teoh via Digitalmars-d wrote: On Tue, Jan 12, 2016 at 02:03:57PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: On 01/12/2016 08:42 AM, Martin Drašar via Digitalmars-d wrote: Wouldn't it be sufficient to mandate usage of dfmt with proper settings before

Re: "Good PR" mechanical check

2016-01-13 Thread H. S. Teoh via Digitalmars-d
On Wed, Jan 13, 2016 at 07:53:45AM +, Brian Schott via Digitalmars-d wrote: > On Wednesday, 13 January 2016 at 05:19:36 UTC, H. S. Teoh wrote: > >There are also some (smaller) examples in std.range, such as in > >transposed(), where nested arrays are formatted like matrices in > >order to make

Re: "Good PR" mechanical check

2016-01-13 Thread H. S. Teoh via Digitalmars-d
On Wed, Jan 13, 2016 at 08:47:19AM -0500, Andrei Alexandrescu via Digitalmars-d wrote: > On 1/13/16 12:19 AM, H. S. Teoh via Digitalmars-d wrote: > >On Tue, Jan 12, 2016 at 02:03:57PM -0500, Andrei Alexandrescu via > >Digitalmars-d wrote: > >>On 01/12/2016 08:42 AM, Martin Drašar via

Re: "Good PR" mechanical check

2016-01-12 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 12, 2016 at 02:03:57PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: > On 01/12/2016 08:42 AM, Martin Drašar via Digitalmars-d wrote: > >Wouldn't it be sufficient to mandate usage of dfmt with proper > >settings before submitting a PR? > > That would suffice at least in the

Re: "Good PR" mechanical check

2016-01-12 Thread Brian Schott via Digitalmars-d
On Wednesday, 13 January 2016 at 05:19:36 UTC, H. S. Teoh wrote: There are also some (smaller) examples in std.range, such as in transposed(), where nested arrays are formatted like matrices in order to make it clear what the function is trying to do. I'm almost certain dfmt (or any mechanical

"Good PR" mechanical check

2016-01-12 Thread Andrei Alexandrescu via Digitalmars-d
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

Re: "Good PR" mechanical check

2016-01-12 Thread Martin Drašar via Digitalmars-d
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 >

Re: "Good PR" mechanical check

2016-01-12 Thread Rikki Cattermole via Digitalmars-d
On 13/01/16 2:34 AM, Andrei Alexandrescu wrote: 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

Re: "Good PR" mechanical check

2016-01-12 Thread tsbockman via Digitalmars-d
On Tuesday, 12 January 2016 at 13:34:25 UTC, Andrei Alexandrescu wrote: [...] I realize that dfmt may need some upgrades first, but isn't it about time to just suck it up and dfmt the whole of phobos and druntime? It will mess with the "git blame", true - but it will do so *once* and end

Re: "Good PR" mechanical check

2016-01-12 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 12 January 2016 at 21:04:33 UTC, Jacob Carlborg wrote: On 2016-01-12 15:53, Adam D. Ruppe wrote: I'm not sure if git supports this but I think it should be done fully automatically. Not even something the user runs, just when they open the pull request, it reformats the code.

Re: "Good PR" mechanical check

2016-01-12 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-12 15:53, Adam D. Ruppe wrote: I'm not sure if git supports this but I think it should be done fully automatically. Not even something the user runs, just when they open the pull request, it reformats the code. The hook/tool would need to do a commit with the changes. How would

Re: "Good PR" mechanical check

2016-01-12 Thread Mathias Lang via Digitalmars-d
On Tuesday, 12 January 2016 at 13:34:25 UTC, Andrei Alexandrescu wrote: 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

Re: "Good PR" mechanical check

2016-01-12 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 12 January 2016 at 13:34:25 UTC, Andrei Alexandrescu wrote: 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 I'm not sure if git supports this but I think

Re: "Good PR" mechanical check

2016-01-12 Thread rsw0x via Digitalmars-d
On Tuesday, 12 January 2016 at 18:25:48 UTC, tsbockman wrote: On Tuesday, 12 January 2016 at 13:34:25 UTC, Andrei Alexandrescu wrote: [...] I realize that dfmt may need some upgrades first, but isn't it about time to just suck it up and dfmt the whole of phobos and druntime? It will mess

Re: "Good PR" mechanical check

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 17:22:16 UTC, Walter Bright wrote: On 1/12/2016 6:53 AM, Adam D. Ruppe wrote: I'm pretty sure dfmt is up to the task in 99% of cases already. The last 1% always takes 99% of the dev time :-( But in this case, the 1% doesn't actually have to be fixed (although

Re: "Good PR" mechanical check

2016-01-12 Thread Andrei Alexandrescu via Digitalmars-d
On 01/12/2016 01:25 PM, tsbockman wrote: On Tuesday, 12 January 2016 at 13:34:25 UTC, Andrei Alexandrescu wrote: [...] I realize that dfmt may need some upgrades first, but isn't it about time to just suck it up and dfmt the whole of phobos and druntime? It will mess with the "git blame",

Re: "Good PR" mechanical check

2016-01-12 Thread Andrei Alexandrescu via Digitalmars-d
On 01/12/2016 08:42 AM, Martin Drašar via Digitalmars-d wrote: Wouldn't it be sufficient to mandate usage of dfmt with proper settings before submitting a PR? That would suffice at least in the beginning. We also need to put dfmt in tools, again a project that's been in limbo for a long time.

Re: "Good PR" mechanical check

2016-01-12 Thread w0rp via Digitalmars-d
I think using dfmt for this is a good idea. If there any problems with dfmt which would prevent it from being used on Phobos, the problems can be patched and then that would strengthen dfmt.

Re: "Good PR" mechanical check

2016-01-12 Thread Walter Bright via Digitalmars-d
On 1/12/2016 6:53 AM, Adam D. Ruppe wrote: I'm pretty sure dfmt is up to the task in 99% of cases already. The last 1% always takes 99% of the dev time :-(