Skip buildifier check on go_repositories.bzl during presubmit.

go_repositories.bzl is generated by Gazelle, which does not add
module/function docstrings. Skipping the buildifier check on this
file to prevent presubmit failure.

Bug: none
Change-Id: I242319f25f2ba686efc2b0ade42852bbe28aabe3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558925
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Mumford <cmumford@google.com>
This commit is contained in:
Chris Mumford 2022-07-15 05:32:45 -07:00 committed by SkCQ
parent f6b1cd1d83
commit 224b97c140

View File

@ -356,7 +356,7 @@ def _CheckBuildifier(input_api, output_api):
for affected_file in input_api.AffectedFiles(include_deletes=False):
affected_file_path = affected_file.LocalPath()
if affected_file_path.endswith('BUILD.bazel') or affected_file_path.endswith('.bzl'):
if not affected_file_path.endswith('public.bzl'):
if not affected_file_path.endswith('public.bzl') and not affected_file_path.endswith('go_repositories.bzl'):
files.append(affected_file_path)
if not files:
return []