Index: PRESUBMIT.py |
diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
index cefb599b18b102331a2fecd0b15cfd30335c2417..cf9941e7e1e396632b3c7d6c0b406dda3cca124d 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).*') |