diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-10 17:55:53 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-10 17:55:53 +0000 |
commit | 120cf540da701f19e9017cf7e603b2946aa88530 (patch) | |
tree | f086c201e9fc87ca0683003f384528cea2ac68bb /PRESUBMIT.py | |
parent | b12f1be3dea384b60106cedeae8f2eaa711b95ae (diff) | |
download | chromium_src-120cf540da701f19e9017cf7e603b2946aa88530.zip chromium_src-120cf540da701f19e9017cf7e603b2946aa88530.tar.gz chromium_src-120cf540da701f19e9017cf7e603b2946aa88530.tar.bz2 |
PRESUBMIT #include check: don't add a warning if we're committing.
This enables the commit queue to commit patches where the #include order is
"wrong" according to the check.
NOTRY=true
BUG=
Review URL: https://chromiumcodereview.appspot.com/11496010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r-- | PRESUBMIT.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index ff620c1..9acfcb28 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -619,8 +619,13 @@ def _CheckIncludeOrder(input_api, output_api): results = [] if warnings: - results.append(output_api.PresubmitPromptWarning(_INCLUDE_ORDER_WARNING, - warnings)) + if not input_api.is_committing: + results.append(output_api.PresubmitPromptWarning(_INCLUDE_ORDER_WARNING, + warnings)) + else: + # We don't warn on commit, to avoid stopping commits going through CQ. + results.append(output_api.PresubmitNotifyResult(_INCLUDE_ORDER_WARNING, + warnings)) return results |