Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: PRESUBMIT.py

Issue 24177004: Exclude more files from the PRESUBMIT #include check. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | PRESUBMIT_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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).*')
« no previous file with comments | « no previous file | PRESUBMIT_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698