kubernetes/vendor/go.uber.org/zap/checklicense.sh
pacoxu 54bc0ff250 update uber zap to 1.16.0 to fix a nil pointer exception
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-04-01 15:28:29 +08:00

18 lines
294 B
Bash

#!/bin/bash -e
ERROR_COUNT=0
while read -r file
do
case "$(head -1 "${file}")" in
*"Copyright (c) "*" Uber Technologies, Inc.")
# everything's cool
;;
*)
echo "$file is missing license header."
(( ERROR_COUNT++ ))
;;
esac
done < <(git ls-files "*\.go")
exit $ERROR_COUNT