You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Michael Park <mc...@gmail.com> on 2015/06/19 02:30:16 UTC

Review Request 35635: Formatting cleanup in the Slave.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35635/
-----------------------------------------------------------

Review request for mesos, Benjamin Hindman and Till Toenshoff.


Repository: mesos


Description
-------

This patch includes fixes for incorrect formatting as well as acceptable-but-can-be-improved formatting.


Diffs
-----

  src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 

Diff: https://reviews.apache.org/r/35635/diff/


Testing
-------

`make check`


Thanks,

Michael Park


Re: Review Request 35635: Formatting cleanup in the Slave.

Posted by Michael Park <mc...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35635/
-----------------------------------------------------------

(Updated June 19, 2015, 2:12 a.m.)


Review request for mesos, Benjamin Hindman and Till Toenshoff.


Changes
-------

Addressed BenM's comments.


Repository: mesos


Description
-------

This patch includes fixes for incorrect formatting as well as acceptable-but-can-be-improved formatting.


Diffs (updated)
-----

  src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 

Diff: https://reviews.apache.org/r/35635/diff/


Testing
-------

`make check`


Thanks,

Michael Park


Re: Review Request 35635: Formatting cleanup in the Slave.

Posted by Michael Park <mc...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35635/#review88474
-----------------------------------------------------------


The following are the list of incorrect styles that were fixed in this patch.


src/slave/slave.cpp (line 844)
<https://reviews.apache.org/r/35635/#comment141014>

    `switch` should have a space.



src/slave/slave.cpp (lines 853 - 854)
<https://reviews.apache.org/r/35635/#comment141024>

    4 space indent -> 2 space indent.



src/slave/slave.cpp (line 933)
<https://reviews.apache.org/r/35635/#comment141015>

    `switch` should have a space.



src/slave/slave.cpp (lines 1265 - 1266)
<https://reviews.apache.org/r/35635/#comment141017>

    Rename `i` to `it`. Use `auto`.



src/slave/slave.cpp (lines 1324 - 1327)
<https://reviews.apache.org/r/35635/#comment141019>

    3 space indent -> 2 space indent.



src/slave/slave.cpp (line 1337)
<https://reviews.apache.org/r/35635/#comment141020>

    4 space indent -> 2 space indent.



src/slave/slave.cpp (lines 1699 - 1702)
<https://reviews.apache.org/r/35635/#comment141021>

    4 space indent -> 2 space indent.



src/slave/slave.cpp (line 1710)
<https://reviews.apache.org/r/35635/#comment141022>

    4 space indent -> 2 space indent.



src/slave/slave.cpp (line 1710)
<https://reviews.apache.org/r/35635/#comment141023>

    4 space indent -> 2 space indent.



src/slave/slave.cpp (lines 3043 - 3044)
<https://reviews.apache.org/r/35635/#comment141025>

    4 space indent -> 2 space indent.



src/slave/slave.cpp (lines 3048 - 3049)
<https://reviews.apache.org/r/35635/#comment141026>

    4 space indent -> 2 space indent.



src/slave/slave.cpp (line 3053)
<https://reviews.apache.org/r/35635/#comment141027>

    4 space indent -> 2 space indent.


- Michael Park


On June 19, 2015, 12:30 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35635/
> -----------------------------------------------------------
> 
> (Updated June 19, 2015, 12:30 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Till Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch includes fixes for incorrect formatting as well as acceptable-but-can-be-improved formatting.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 
> 
> Diff: https://reviews.apache.org/r/35635/diff/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Re: Review Request 35635: Formatting cleanup in the Slave.

Posted by Michael Park <mc...@gmail.com>.

> On June 19, 2015, 12:40 a.m., Ben Mahler wrote:
> > src/slave/slave.cpp, lines 3154-3159
> > <https://reviews.apache.org/r/35635/diff/1/?file=987708#file987708line3154>
> >
> >     Is this really better? Also we have a lot of code following this old style, I'm hesitant to introduce inconsistency.

I've reverted this change and fixed other places where it was inconsistent with the old style.


> On June 19, 2015, 12:40 a.m., Ben Mahler wrote:
> > src/slave/slave.cpp, lines 3405-3406
> > <https://reviews.apache.org/r/35635/diff/1/?file=987708#file987708line3405>
> >
> >     Hm.. we've been preferring to put continutations (.then / .onAny / etc) on a new line (consider that these are like statements / programmable semi-colons), so separate lines tends to be easier to read from what we've found.

Reverted.


> On June 19, 2015, 12:40 a.m., Ben Mahler wrote:
> > src/slave/slave.cpp, lines 2929-2930
> > <https://reviews.apache.org/r/35635/diff/1/?file=987708#file987708line2929>
> >
> >     Is this better? Seems to be making it more "jagged" IMO.

I don't understand, could you explain how this is more "jagged"?


> On June 19, 2015, 12:40 a.m., Ben Mahler wrote:
> > src/slave/slave.cpp, lines 3589-3595
> > <https://reviews.apache.org/r/35635/diff/1/?file=987708#file987708line3589>
> >
> >     This is a detraction from the existing style IMO

Defining how many indents are considered "jagged" is something that came up in https://issues.apache.org/jira/browse/MESOS-2618. Anyway, I've reverted this change.


- Michael


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35635/#review88475
-----------------------------------------------------------


On June 19, 2015, 2:12 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35635/
> -----------------------------------------------------------
> 
> (Updated June 19, 2015, 2:12 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Till Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch includes fixes for incorrect formatting as well as acceptable-but-can-be-improved formatting.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 
> 
> Diff: https://reviews.apache.org/r/35635/diff/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Re: Review Request 35635: Formatting cleanup in the Slave.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35635/#review88475
-----------------------------------------------------------



src/slave/slave.cpp (lines 2904 - 2905)
<https://reviews.apache.org/r/35635/#comment141032>

    Is this better? Seems to be making it more "jagged" IMO.



src/slave/slave.cpp (lines 3120 - 3125)
<https://reviews.apache.org/r/35635/#comment141031>

    Is this really better? Also we have a lot of code following this old style, I'm hesitant to introduce inconsistency.



src/slave/slave.cpp (line 3371)
<https://reviews.apache.org/r/35635/#comment141028>

    Hm.. we've been preferring to put continutations (.then / .onAny / etc) on a new line (consider that these are like statements / programmable semi-colons), so separate lines tends to be easier to read from what we've found.



src/slave/slave.cpp (lines 3554 - 3560)
<https://reviews.apache.org/r/35635/#comment141030>

    This is a detraction from the existing style IMO


- Ben Mahler


On June 19, 2015, 12:30 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35635/
> -----------------------------------------------------------
> 
> (Updated June 19, 2015, 12:30 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Till Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch includes fixes for incorrect formatting as well as acceptable-but-can-be-improved formatting.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 
> 
> Diff: https://reviews.apache.org/r/35635/diff/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>