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

Side by Side Diff: PRESUBMIT.py

Issue 1133713009: Subject .mm files to the header sorting presubmit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase - of course... it would be one of my patches I conflict with :| Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/files/file_util_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 819
820 Each region separated by #if, #elif, #else, #endif, #define and #undef follows 820 Each region separated by #if, #elif, #else, #endif, #define and #undef follows
821 these rules separately. 821 these rules separately.
822 """ 822 """
823 def FileFilterIncludeOrder(affected_file): 823 def FileFilterIncludeOrder(affected_file):
824 black_list = (_EXCLUDED_PATHS + input_api.DEFAULT_BLACK_LIST) 824 black_list = (_EXCLUDED_PATHS + input_api.DEFAULT_BLACK_LIST)
825 return input_api.FilterSourceFile(affected_file, black_list=black_list) 825 return input_api.FilterSourceFile(affected_file, black_list=black_list)
826 826
827 warnings = [] 827 warnings = []
828 for f in input_api.AffectedFiles(file_filter=FileFilterIncludeOrder): 828 for f in input_api.AffectedFiles(file_filter=FileFilterIncludeOrder):
829 if f.LocalPath().endswith(('.cc', '.h')): 829 if f.LocalPath().endswith(('.cc', '.h', '.mm')):
830 changed_linenums = set(line_num for line_num, _ in f.ChangedContents()) 830 changed_linenums = set(line_num for line_num, _ in f.ChangedContents())
831 warnings.extend(_CheckIncludeOrderInFile(input_api, f, changed_linenums)) 831 warnings.extend(_CheckIncludeOrderInFile(input_api, f, changed_linenums))
832 832
833 results = [] 833 results = []
834 if warnings: 834 if warnings:
835 results.append(output_api.PresubmitPromptOrNotify(_INCLUDE_ORDER_WARNING, 835 results.append(output_api.PresubmitPromptOrNotify(_INCLUDE_ORDER_WARNING,
836 warnings)) 836 warnings))
837 return results 837 return results
838 838
839 839
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 # Explicitly iterate over copies of dicts since we mutate them. 1803 # Explicitly iterate over copies of dicts since we mutate them.
1804 for master in builders.keys(): 1804 for master in builders.keys():
1805 for builder in builders[master].keys(): 1805 for builder in builders[master].keys():
1806 # Do not trigger presubmit builders, since they're likely to fail 1806 # Do not trigger presubmit builders, since they're likely to fail
1807 # (e.g. OWNERS checks before finished code review), and we're 1807 # (e.g. OWNERS checks before finished code review), and we're
1808 # running local presubmit anyway. 1808 # running local presubmit anyway.
1809 if 'presubmit' in builder: 1809 if 'presubmit' in builder:
1810 builders[master].pop(builder) 1810 builders[master].pop(builder)
1811 1811
1812 return builders 1812 return builders
OLDNEW
« no previous file with comments | « no previous file | base/files/file_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698