tools: cpplint: fix up build/include_order rule
authorBen Noordhuis <info@bnoordhuis.nl>
Wed, 31 Jul 2013 20:34:34 +0000 (22:34 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Wed, 31 Jul 2013 20:34:35 +0000 (22:34 +0200)
commit847c6d980c83274b6c37e29a07d19a696435588b
treed47b73e6403c6358153486f338f77b8494611e8b
parent58159e308b2356265faed168909122c4ef0f61d4
tools: cpplint: fix up build/include_order rule

Change the build/include_order rule to match our preference:
project headers before system headers.

The rationale is that system headers before project headers makes it
easy to slip in bugs where a project header that requires a definition
from a system header, forgets to include the system header but still
compiles because the source files that include the project header
coincidentally include the system header too.

A good example is the size_t type. A project header file that needs the
definition of size_t should include stddef.h but forgetting to do so
will probably go unnoticed for a long time because almost every other
system header includes stddef.h (either directly or indirectly) and
almost every source file includes one or more system headers.

Ergo, project headers before system headers. It's a good thing.
tools/cpplint.py