File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 3434 skippedPaths = regexp .MustCompile (`Godeps|third_party|_gopath|_output|\.git|cluster/env.sh|vendor|test/e2e/generated/bindata.go|site/themes/docsy|test/integration/testdata|hack/benchmark/image-build/minikube-image-benchmark|hack/benchmark/time-to-k8s/time-to-k8s-repo` )
3535 windowdNewLine = regexp .MustCompile (`\r` )
3636 txtExtension = regexp .MustCompile (`\.txt` )
37- goBuildTag = regexp .MustCompile (`(?m)^(//go:build.*\n)+\n` )
37+ goBuildTag = regexp .MustCompile (`(?m)^(//go:build.*\n|// +build.*\n )+\n` )
3838 shebang = regexp .MustCompile (`(?m)^(#!.*\n)\n*` )
3939 copyright = regexp .MustCompile (`Copyright YEAR` )
4040 copyrightReal = regexp .MustCompile (`Copyright \d{4}` )
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ function prepend() {
3030 local file_headers=" "
3131
3232 if [ " ${headers} " != " " ]; then
33- file_headers=" $( cat ${f} | grep ${headers} ) "
33+ file_headers=" $( cat ${f} | grep -E ${headers} ) "
3434 fi
3535
3636 if [ " ${file_headers} " != " " ]; then
37- fileContent=" $( cat ${f} | grep -v ${headers} ) "
37+ fileContent=" $( cat ${f} | grep -v -E ${headers} ) "
3838 printf ' %s\n\n%s\n%s\n' " $file_headers " " ${copyright} " " $fileContent " > ${f}
3939 else
4040 fileContent=" $( cat ${f} ) "
@@ -44,7 +44,7 @@ function prepend() {
4444 done
4545}
4646
47- prepend " \.go" " go" " go:build"
47+ prepend " \.go" " go" " go:build|\+build "
4848prepend " \.py" " py"
4949prepend " \.sh" " sh" " #!"
5050prepend Makefile Makefile
You can’t perform that action at this time.
0 commit comments