David Keeler:
> The style guidelines at
> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
> indicate that #includes are to be sorted. It does not say whether or not
> to consider case when doing so (and if so, which case goes first?). That
> is, should it be:
> 
> #include "Foo.h"
> #include "bar.h"
> 
> or
> 
> #include "bar.h"
> #include "Foo.h"

If you are preparing to make some changes to the Coding style document
around #include order, can you also please prescribe (a) where system-
includes get placed, e.g.

#include "aaa.h"
#include <bbb.h>
#include "ccc.h"
#include <ddd.h>

or

#include <bbb.h>
#include <ddd.h>
#include "aaa.h"
#include "ccc.h"

and (b) how includes with paths are sorted, e.g.

#include "aaa.h"
#include "bbb/bbb.h"
#include "bbb/ccc/ddd.h"
#include "bbb/eee/fff.h"
#include "bbb/ggg.h"
#include "ccc.h"

or

#include "bbb/ccc/ddd.h"
#include "bbb/eee/fff.h"
#include "bbb/bbb.h"
#include "bbb/ggg.h"
#include "aaa.h"
#include "ccc.h"

or some other order that makes sense.

-- 
Cameron McCormack ≝ http://mcc.id.au/
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to