| Index: presubmit_canned_checks.py
|
| diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
|
| index 84d7f8e0c13eb8f07a82a33227b75e16ca792dde..d959a5880a2544219469517d55a5dce928472f17 100755
|
| --- a/presubmit_canned_checks.py
|
| +++ b/presubmit_canned_checks.py
|
| @@ -53,6 +53,16 @@ def CheckDoNotSubmitInDescription(input_api, output_api):
|
| return []
|
|
|
|
|
| +def CheckChangeHasDescription(input_api, output_api):
|
| + """Checks the CL description is not empty."""
|
| + text = input_api.change.DescriptionText()
|
| + if text.strip() == '':
|
| + if input_api.is_committing:
|
| + return [output_api.PresubmitError("Add a description.")]
|
| + else:
|
| + return [output_api.PresubmitNotifyResult("Add a description.")]
|
| + return []
|
| +
|
| ### Content checks
|
|
|
| def CheckDoNotSubmitInFiles(input_api, output_api):
|
|
|