From 23093b697d27854409f4fb5a762ed844cbbbf448 Mon Sep 17 00:00:00 2001 From: "marja@chromium.org" Date: Fri, 20 Sep 2013 12:16:30 +0000 Subject: 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 --- PRESUBMIT.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'PRESUBMIT.py') 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., 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., includes often need to appear in a + # specific order. + # 2) , "build/build_config.h" + excluded_include_pattern = input_api.re.compile( + r'\s*#include (\<.*/.*|\|"build/build_config.h")') custom_include_pattern = input_api.re.compile(r'\s*#include "(?P.*)"') if_pattern = input_api.re.compile( r'\s*#\s*(if|elif|else|endif|define|undef).*') -- cgit v1.1