Revert "Fix OWNERS canned check to avoid duplicate output."

This reverts commit 66c50ea1f1.

Reason for revert:
Breaks some OWNERS checks. See https://crbug.com/684270 for details.

Original change's description:
> Fix OWNERS canned check to avoid duplicate output.
>
> 1. Update PanProjectChecks() to supply source_filter to CheckOwners().
>    This prevents files under e.g. third_party/WebKit being checked both
>    by the top-level and sub-directory PRESUBMIT rules.
> 2. Fix CheckOwners() to list missing-OWNERS only for the sub-directory
>    it is invoked on, rather than the whole CL. This prevents files under
>    sub-directories with their own PRESUBMIT rule, within the same repo,
>    from causing OWNERS to be checked for files outside that directory.
>
> BUG=
>
> Reviewed-on: https://chromium-review.googlesource.com/426003

TBR=wez@chromium.org,dcheng@chromium.org
BUG=684270

Change-Id: I094818a6fa3e16fbac0d37d2596a40210611ee05
Reviewed-on: https://chromium-review.googlesource.com/431656
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
changes/56/431656/2
Dirk Pranke 9 years ago
parent 0001782a88
commit 3c86cee33a

@ -873,7 +873,7 @@ def CheckOwners(input_api, output_api, source_file_filter=None):
output_fn = output_api.PresubmitNotifyResult
affected_files = set([f.LocalPath() for f in
input_api.AffectedFiles(file_filter=source_file_filter)])
input_api.change.AffectedFiles(file_filter=source_file_filter)])
owners_db = input_api.owners_db
owner_email, reviewers = GetCodereviewOwnerAndReviewers(
@ -1091,7 +1091,7 @@ def PanProjectChecks(input_api, output_api,
if owners_check:
snapshot("checking owners")
results.extend(input_api.canned_checks.CheckOwners(
input_api, output_api, source_file_filter=sources))
input_api, output_api, source_file_filter=None))
snapshot("checking long lines")
results.extend(input_api.canned_checks.CheckLongLines(

@ -2195,7 +2195,7 @@ class CannedChecksUnittest(PresubmitTestsBase):
if not is_committing or (not tbr and issue):
affected_file.LocalPath().AndReturn('foo/xyz.cc')
input_api.AffectedFiles(file_filter=None).AndReturn([affected_file])
change.AffectedFiles(file_filter=None).AndReturn([affected_file])
if issue and not rietveld_response and not gerrit_response:
rietveld_response = {
"owner_email": change.author_email,

Loading…
Cancel
Save