Skip to content

Commit

Permalink
Update boilerplate check to allow new go:build syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciekPytel committed Jan 12, 2022
1 parent 4ea0aba commit e6b56b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hack/boilerplate/boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6b56b3

Please sign in to comment.