From e6b56b3f564c4aa2fb09cb106fc5a7d23fc6af10 Mon Sep 17 00:00:00 2001 From: Maciek Pytel Date: Tue, 28 Dec 2021 15:14:38 +0100 Subject: [PATCH] Update boilerplate check to allow new go:build syntax --- hack/boilerplate/boilerplate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py index 53b539703330..d25a1a4564dd 100755 --- a/hack/boilerplate/boilerplate.py +++ b/hack/boilerplate/boilerplate.py @@ -215,7 +215,8 @@ def get_regexs(): # company holder names can be anything regexs["date"] = re.compile(get_dates()) # strip // +build \n\n build constraints - regexs["go_build_constraints"] = re.compile(r"^(// \+build.*\n)+\n", re.MULTILINE) + regexs["go_build_constraints"] = re.compile( + r"^(//(go:build| \+build).*\n)+\n", re.MULTILINE) # strip #!.* from shell scripts regexs["shebang"] = re.compile(r"^(#!.*\n)\n*", re.MULTILINE) # Search for generated files