Update boilerplate check to allow new go:build syntax

This commit is contained in:
Maciek Pytel 2021-12-28 15:14:38 +01:00
parent 8f003dcb70
commit 37d2bd38cc
1 changed files with 2 additions and 1 deletions

View File

@ -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