diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-09-05 13:03:59 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-09-05 18:24:26 +0200 |
commit | 54c1f2d761b506132a709a7e8573c7b54d048cf0 (patch) | |
tree | a276c14d170b80ca0d7f8accd366975535b07bd2 /man/systemd-notify.xml | |
parent | 335250e7bdd09794f9a639c99fbd73b701b2d6e1 (diff) |
CODING_STYLE: mandate alphabetical include order
systemd-internal headers must not rely on include order. That means, they
either must contain forward-declarations of used types/functions, or they
must include all dependencies on their own. Therefore, there is no reason
to mandate an include order on the call-side.
However, global includes should always be ordered first. We don't want
local definitions to leak into global includes, possible changing their
behavior. Apparently, namespacing is a complex problem that people are
incapable of implementing properly..
Apart from "global before local", there is no reason to mandate a random
include order (which we happen to do right now). Instead, mandate
alphabetical ordering. The current rules do not have any benefit at all.
They neither reduce include-complexity, nor allow easy auditing of
include files. But with alphabetical ordering, we get duplicate-detection
for free, it gets *much much* easier to figure out whether a header is
already included, and it is trivial to add new headers.
Diffstat (limited to 'man/systemd-notify.xml')
0 files changed, 0 insertions, 0 deletions