summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authortapted <tapted@chromium.org>2015-05-19 06:08:08 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-19 13:08:19 +0000
commit574f09c11f5a366b059d0992c180543697666c8a (patch)
tree37860c85bf7ccd1c0dabdaf3b9482cc483d252d3 /PRESUBMIT.py
parent2878cede2eca4465dfd353bd3354e61eaa447844 (diff)
downloadchromium_src-574f09c11f5a366b059d0992c180543697666c8a.zip
chromium_src-574f09c11f5a366b059d0992c180543697666c8a.tar.gz
chromium_src-574f09c11f5a366b059d0992c180543697666c8a.tar.bz2
Subject .mm files to the header sorting presubmit
The presubmit is already robust to handle Objective-C .h files. Not checking .mm files just adds extra review burden. Plus I can't just press F5 in Sublime to sort lines in .mm files due to import vs include, so it actually needs some brainpower when adding something and I keep forgetting to do that. This adds .mm to the list of file extensions the header sorting presubmit checks for, and fixes the current mistakes to avoid annoying people on presubmit with this change. BUG=None TBR=keybuk@chromium.org,jamescook@chromium.org,stuartmorgan@chromium.org,xhwang@chromium.org,rsesek@chromium.org,zea@chromium.org R=thakis@chromium.org,jochen@chromium.org Review URL: https://codereview.chromium.org/1133713009 Cr-Commit-Position: refs/heads/master@{#330509}
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 860de56..4548d4e4 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -826,7 +826,7 @@ def _CheckIncludeOrder(input_api, output_api):
warnings = []
for f in input_api.AffectedFiles(file_filter=FileFilterIncludeOrder):
- if f.LocalPath().endswith(('.cc', '.h')):
+ if f.LocalPath().endswith(('.cc', '.h', '.mm')):
changed_linenums = set(line_num for line_num, _ in f.ChangedContents())
warnings.extend(_CheckIncludeOrderInFile(input_api, f, changed_linenums))