Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame^] | 1 | #!/bin/bash -e |
2 | |||||
3 | ERROR_COUNT=0 | ||||
4 | while read -r file | ||||
5 | do | ||||
6 | case "$(head -1 "${file}")" in | ||||
7 | *"Copyright (c) "*" Uber Technologies, Inc.") | ||||
8 | # everything's cool | ||||
9 | ;; | ||||
10 | *) | ||||
11 | echo "$file is missing license header." | ||||
12 | (( ERROR_COUNT++ )) | ||||
13 | ;; | ||||
14 | esac | ||||
15 | done < <(git ls-files "*\.go") | ||||
16 | |||||
17 | exit $ERROR_COUNT |