check_license.sh 294 B

1234567891011121314151617
  1. #!/bin/bash -e
  2. ERROR_COUNT=0
  3. while read -r file
  4. do
  5. case "$(head -1 "${file}")" in
  6. *"Copyright (c) "*" Uber Technologies, Inc.")
  7. # everything's cool
  8. ;;
  9. *)
  10. echo "$file is missing license header."
  11. (( ERROR_COUNT++ ))
  12. ;;
  13. esac
  14. done < <(git ls-files "*\.go")
  15. exit $ERROR_COUNT