github.com/pingcap/ticdc@v0.0.0-20220526033649-485a10ef2652/scripts/check-copyright.sh (about) 1 result=$(find ./ -name "*.go" | grep -vE '.pb.go|vendor/|leaktest.go|kv_gen' | while read file_path; do 2 head=`cat "${file_path}" | head -n 1` 3 if [[ ! "$head" =~ Copyright\ 20[0-9][0-9]\ PingCAP,\ Inc\. ]]; then 4 echo "${file_path}" 5 fi 6 done) 7 8 if [ -n "$result" ]; then 9 echo "The copyright information of following files is incorrect:" 10 echo "$result" 11 exit 1 12 fi