Chromium Code Reviews| Index: PRESUBMIT.py |
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
| index ec9611d2650755e069d769bae7c87023df5f4d9e..3ba2fd93b84a5016beab62d375633f86a8ae2490 100644 |
| --- a/PRESUBMIT.py |
| +++ b/PRESUBMIT.py |
| @@ -718,9 +718,16 @@ 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 + |
| + _TEST_CODE_EXCLUDED_PATHS + |
|
Nico
2014/08/15 18:25:59
This one doesn't look right. We care about include
|
| + 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)) |