diff --git a/scripts/check_license.sh b/scripts/check_license.sh new file mode 100755 index 000000000..c88d3cacb --- /dev/null +++ b/scripts/check_license.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +licRes=$( +for file in $(find . -type f -iname '*.go' ! -path './internal/*'); do + head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)" || echo -e " ${file}" +done;) +if [ -n "${licRes}" ]; then + echo -e "license header checking failed:\n${licRes}" + exit 255 +fi