Commit c69f8fbd authored by machenbach's avatar machenbach Committed by Commit bot

[test] Don't run presubmit over deleted files.

BUG=v8:5603
NOTRY=true

Review-Url: https://codereview.chromium.org/2534813002
Cr-Commit-Position: refs/heads/master@{#41297}
parent e96076ee
......@@ -71,9 +71,11 @@ def _V8PresubmitChecks(input_api, output_api):
from presubmit import CheckStatusFiles
results = []
if not CppLintProcessor().RunOnFiles(input_api.AffectedFiles()):
if not CppLintProcessor().RunOnFiles(
input_api.AffectedFiles(include_deletes=False)):
results.append(output_api.PresubmitError("C++ lint check failed"))
if not SourceProcessor().RunOnFiles(input_api.AffectedFiles()):
if not SourceProcessor().RunOnFiles(
input_api.AffectedFiles(include_deletes=False)):
results.append(output_api.PresubmitError(
"Copyright header, trailing whitespaces and two empty lines " \
"between declarations check failed"))
......
......@@ -179,8 +179,7 @@ class SourceFileProcessor(object):
all_files = [
f.AbsoluteLocalPath()
for f in files
if (os.path.isfile(f.AbsoluteLocalPath()) and
not self.IgnoreFile(f.LocalPath()) and
if (not self.IgnoreFile(f.LocalPath()) and
self.IsRelevant(f.LocalPath()) and
all(not self.IgnoreDir(d) for d in dirs(f.LocalPath())) and
any(map(f.LocalPath().startswith, search_paths)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment