File: check_license.sh

package info (click to toggle)
golang-github-uber-go-tally 4.1.16-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,228 kB
  • sloc: makefile: 89; sh: 13
file content (16 lines) | stat: -rwxr-xr-x 292 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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:missing license header."
			(( ERROR_COUNT++ ))
			;;
	esac
done < <(git ls-files "*\.go")
exit "$ERROR_COUNT"