Remove LOG line checking from presubmit
As discussed at https://groups.google.com/d/msg/v8-dev/4EWhm5hltUs/daJgVxHHBQAJ, this check is not useful, and mostly serves to be a speed bump that simply forces developers to add "LOG=N" to their commits. The ChangeLog is already sparse enough (see detail stats at https://groups.google.com/d/msg/v8-dev/4EWhm5hltUs/Z276qyh8CQAJ) that it's very unlikely to be a useful signal compared to reading the commit log directly. LOG=y NOTRY=true Review-Url: https://codereview.chromium.org/1956993002 Cr-Commit-Position: refs/heads/master@{#36147}
This commit is contained in:
parent
8c8600db2e
commit
ab3f008b8a
17
PRESUBMIT.py
17
PRESUBMIT.py
@ -242,32 +242,15 @@ def _SkipTreeCheck(input_api, output_api):
|
|||||||
return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip'
|
return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip'
|
||||||
|
|
||||||
|
|
||||||
def _CheckChangeLogFlag(input_api, output_api, warn):
|
|
||||||
"""Checks usage of LOG= flag in the commit message."""
|
|
||||||
results = []
|
|
||||||
if (input_api.change.BUG and input_api.change.BUG != 'none' and
|
|
||||||
not 'LOG' in input_api.change.tags):
|
|
||||||
text = ('An issue reference (BUG=) requires a change log flag (LOG=). '
|
|
||||||
'Use LOG=Y for including this commit message in the change log. '
|
|
||||||
'Use LOG=N or leave blank otherwise.')
|
|
||||||
if warn:
|
|
||||||
results.append(output_api.PresubmitPromptWarning(text))
|
|
||||||
else:
|
|
||||||
results.append(output_api.PresubmitError(text))
|
|
||||||
return results
|
|
||||||
|
|
||||||
|
|
||||||
def CheckChangeOnUpload(input_api, output_api):
|
def CheckChangeOnUpload(input_api, output_api):
|
||||||
results = []
|
results = []
|
||||||
results.extend(_CommonChecks(input_api, output_api))
|
results.extend(_CommonChecks(input_api, output_api))
|
||||||
results.extend(_CheckChangeLogFlag(input_api, output_api, True))
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
def CheckChangeOnCommit(input_api, output_api):
|
def CheckChangeOnCommit(input_api, output_api):
|
||||||
results = []
|
results = []
|
||||||
results.extend(_CommonChecks(input_api, output_api))
|
results.extend(_CommonChecks(input_api, output_api))
|
||||||
results.extend(_CheckChangeLogFlag(input_api, output_api, False))
|
|
||||||
results.extend(input_api.canned_checks.CheckChangeHasDescription(
|
results.extend(input_api.canned_checks.CheckChangeHasDescription(
|
||||||
input_api, output_api))
|
input_api, output_api))
|
||||||
if not _SkipTreeCheck(input_api, output_api):
|
if not _SkipTreeCheck(input_api, output_api):
|
||||||
|
Loading…
Reference in New Issue
Block a user