diff options
author | dominik.rottsches@intel.com <dominik.rottsches@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-15 19:08:35 +0000 |
---|---|---|
committer | dominik.rottsches@intel.com <dominik.rottsches@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-15 19:10:48 +0000 |
commit | e120b01ad8f20b40579eb0a5b43c17fc9d0698d5 (patch) | |
tree | 384465d5e6cf0f0fd33ddc8100d948f3143504c3 | |
parent | 8c83fe076ebe86c04e6d703be2bfb2f2e8729158 (diff) | |
download | chromium_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
-rw-r--r-- | PRESUBMIT.py | 5 | ||||
-rwxr-xr-x | PRESUBMIT_test.py | 2 |
2 files changed, 5 insertions, 2 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)) diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py index 10d0690..dd8dcbe 100755 --- a/PRESUBMIT_test.py +++ b/PRESUBMIT_test.py @@ -27,7 +27,7 @@ class MockInputApi(object): self.files = [] self.is_committing = False - def AffectedFiles(self): + def AffectedFiles(self, file_filter=None): return self.files def PresubmitLocalPath(self): |