Skip to content

Commit 898b2d7

Browse files
committed
tools: fix license header check
Signed-off-by: Jonathan Boulle <[email protected]>
1 parent 01b3557 commit 898b2d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.tool/check-license

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ set -o pipefail
77
ret=0
88

99
for file in $(find . -type f -iname '*.go' ! -path './vendor/*'); do
10-
(head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)") || (echo "${file}:missing license header" && ret=1)
10+
if ! head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)"; then
11+
echo "${file}:missing license header"
12+
ret=1
13+
fi
1114
done
1215

1316
exit $ret

0 commit comments

Comments
 (0)