|
@@ -152,7 +152,7 @@ def CheckAuthorizedAuthor(input_api, output_api, bot_allowlist=None):
|
|
"""For non-googler/chromites committers, verify the author's email address is
|
|
"""For non-googler/chromites committers, verify the author's email address is
|
|
in AUTHORS.
|
|
in AUTHORS.
|
|
"""
|
|
"""
|
|
- if input_api.is_committing:
|
|
|
|
|
|
+ if input_api.is_committing or input_api.no_diffs:
|
|
error_type = output_api.PresubmitError
|
|
error_type = output_api.PresubmitError
|
|
else:
|
|
else:
|
|
error_type = output_api.PresubmitPromptWarning
|
|
error_type = output_api.PresubmitPromptWarning
|
|
@@ -263,6 +263,9 @@ def CheckChangeLintsClean(input_api, output_api, source_file_filter=None,
|
|
cpplint.ProcessFile(file_name, verbose_level)
|
|
cpplint.ProcessFile(file_name, verbose_level)
|
|
|
|
|
|
if cpplint._cpplint_state.error_count > 0:
|
|
if cpplint._cpplint_state.error_count > 0:
|
|
|
|
+ # cpplint errors currently cannot be counted as errors during upload
|
|
|
|
+ # presubmits because some directories only run cpplint during upload and
|
|
|
|
+ # therefore are far from cpplint clean.
|
|
if input_api.is_committing:
|
|
if input_api.is_committing:
|
|
res_type = output_api.PresubmitError
|
|
res_type = output_api.PresubmitError
|
|
else:
|
|
else:
|
|
@@ -894,7 +897,7 @@ def GetPythonUnitTests(input_api, output_api, unit_tests, python3=False):
|
|
DEPRECATED.
|
|
DEPRECATED.
|
|
"""
|
|
"""
|
|
# We don't want to hinder users from uploading incomplete patches.
|
|
# We don't want to hinder users from uploading incomplete patches.
|
|
- if input_api.is_committing:
|
|
|
|
|
|
+ if input_api.is_committing or input_api.no_diffs:
|
|
message_type = output_api.PresubmitError
|
|
message_type = output_api.PresubmitError
|
|
else:
|
|
else:
|
|
message_type = output_api.PresubmitNotifyResult
|
|
message_type = output_api.PresubmitNotifyResult
|
|
@@ -1020,7 +1023,7 @@ def GetPylint(input_api,
|
|
'Unsupported pylint version: %s' % version
|
|
'Unsupported pylint version: %s' % version
|
|
python2 = (version == '1.5')
|
|
python2 = (version == '1.5')
|
|
|
|
|
|
- if input_api.is_committing:
|
|
|
|
|
|
+ if input_api.is_committing or input_api.no_diffs:
|
|
error_type = output_api.PresubmitError
|
|
error_type = output_api.PresubmitError
|
|
else:
|
|
else:
|
|
error_type = output_api.PresubmitPromptWarning
|
|
error_type = output_api.PresubmitPromptWarning
|