diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-20 12:16:30 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-20 12:16:30 +0000 |
commit | 23093b697d27854409f4fb5a762ed844cbbbf448 (patch) | |
tree | 9d726c863d8e088f93c3a4103554c03b63b7294c /PRESUBMIT.py | |
parent | d6f3b833519b812cef657df7fd0102e9e8f7b448 (diff) | |
download | chromium_src-23093b697d27854409f4fb5a762ed844cbbbf448.zip chromium_src-23093b697d27854409f4fb5a762ed844cbbbf448.tar.gz chromium_src-23093b697d27854409f4fb5a762ed844cbbbf448.tar.bz2 |
Exclude more files from the PRESUBMIT #include check.
These files need to be included out-of-order.
BUG=NONE
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/24177004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r-- | PRESUBMIT.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index cefb599..cf9941e 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -571,9 +571,12 @@ def _CheckIncludeOrderInFile(input_api, f, changed_linenums): """Checks the #include order for the given file f.""" system_include_pattern = input_api.re.compile(r'\s*#include \<.*') - # Exclude #include <.../...> includes from the check; e.g., <sys/...> includes - # often need to appear in a specific order. - excluded_include_pattern = input_api.re.compile(r'\s*#include \<.*/.*') + # Exclude the following includes from the check: + # 1) #include <.../...>, e.g., <sys/...> includes often need to appear in a + # specific order. + # 2) <atlbase.h>, "build/build_config.h" + excluded_include_pattern = input_api.re.compile( + r'\s*#include (\<.*/.*|\<atlbase\.h\>|"build/build_config.h")') custom_include_pattern = input_api.re.compile(r'\s*#include "(?P<FILE>.*)"') if_pattern = input_api.re.compile( r'\s*#\s*(if|elif|else|endif|define|undef).*') |