domogeek/vendor/go.uber.org/zap/checklicense.sh

18 lines
294 B
Bash
Raw Permalink Normal View History

2022-04-18 21:16:35 +00:00
#!/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