> On Nov. 4, 2016, 9:06 a.m., Benjamin Bannier wrote:
> > src/tests/containerizer/docker_volume_isolator_tests.cpp, lines 36-37
> > <https://reviews.apache.org/r/53435/diff/1/?file=1553266#file1553266line36>
> >
> >     That's what I understood, but I made an error in my comment: in that 
> > ordering it should be at the same level as `runtime.hpp` since both of 
> > these a 6 levels deep. Currently `linux.hpp` is preceeded by headers 7 
> > levels deep.
> >     
> >     I seems this ruleis rather complicated in pratice.
> 
> Neil Conway wrote:
>     Yeah, there are a lot of corner cases. Personally I think this isn't 
> worth devoting a lot of attention to in the absence of tool support.
>     
>     I'd personally vote for (a) coming up with a reasonable sort order (b) 
> once we get consensus, add that to the style guide (c) writing a clang-tidy 
> check that implements the sort order.

This order (alphabetical, with extra newlines between different nesting levels) 
is reasonable enough... 

But a counter example is how we sort `stout` headers (by nesting level first, 
then alphabetical):
```
#include <stout/foreach.hpp>
#include <stout/hashmap.hpp>
#include <stout/os.hpp>
#include <stout/uuid.hpp>

#include <stout/os/close.hpp>
#include <stout/os/open.hpp>
#include <stout/os/su.hpp>
```


- Joseph


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


On Nov. 4, 2016, 8:15 a.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53435/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2016, 8:15 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed header include order.
> 
> 
> Diffs
> -----
> 
>   src/tests/containerizer/docker_volume_isolator_tests.cpp 
> ca7bffd3b1773a11a4679d114885d3edd977b02b 
>   src/tests/containerizer/mesos_containerizer_tests.cpp 
> 4df537747d84daa68c29e2d05b22fa386a4a16db 
> 
> Diff: https://reviews.apache.org/r/53435/diff/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>

Reply via email to