summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authordominik.rottsches@intel.com <dominik.rottsches@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-15 19:08:35 +0000
committerdominik.rottsches@intel.com <dominik.rottsches@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-15 19:10:48 +0000
commite120b01ad8f20b40579eb0a5b43c17fc9d0698d5 (patch)
tree384465d5e6cf0f0fd33ddc8100d948f3143504c3 /PRESUBMIT.py
parent8c83fe076ebe86c04e6d703be2bfb2f2e8729158 (diff)
downloadchromium_src-e120b01ad8f20b40579eb0a5b43c17fc9d0698d5.zip
chromium_src-e120b01ad8f20b40579eb0a5b43c17fc9d0698d5.tar.gz
chromium_src-e120b01ad8f20b40579eb0a5b43c17fc9d0698d5.tar.bz2
Do not run header include order checks on blacklisted files
The header include order checks were running on all affected files, including third_party for example, this causes issues when rolling harfbuzz-ng. BUG=404105 NOTRY=true Review URL: https://codereview.chromium.org/462323003 Cr-Commit-Position: refs/heads/master@{#289968} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index ec9611d..581b700 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -718,9 +718,12 @@ def _CheckIncludeOrder(input_api, output_api):
Each region separated by #if, #elif, #else, #endif, #define and #undef follows
these rules separately.
"""
+ def FileFilterIncludeOrder(affected_file):
+ black_list = (_EXCLUDED_PATHS + input_api.DEFAULT_BLACK_LIST)
+ return input_api.FilterSourceFile(affected_file, black_list=black_list)
warnings = []
- for f in input_api.AffectedFiles():
+ for f in input_api.AffectedFiles(file_filter=FileFilterIncludeOrder):
if f.LocalPath().endswith(('.cc', '.h')):
changed_linenums = set(line_num for line_num, _ in f.ChangedContents())
warnings.extend(_CheckIncludeOrderInFile(input_api, f, changed_linenums))