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

Unified Diff: PRESUBMIT.py

Issue 462323003: Do not run header include order checks on blacklisted files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 6 years, 4 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 ec9611d2650755e069d769bae7c87023df5f4d9e..581b700fd69ee53c4caf3af6877b300e3128305d 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))
« 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