Index: PRESUBMIT.py |
diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
index ff620c1852ae742c9995ae8005d7e6ab2a02d326..9acfcb281054a834ff6b9229622417bbf865a886 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 |