| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | |
| 3 | set -o errexit |
| 4 | set -o nounset |
| 5 | set -o pipefail |
| 6 | |
| 7 | ret=0 |
| 8 | |
| 9 | for file in $(findscip-shell system . . find. . -type f -iname '*.go' ! -path './vendor/*'); do |
| 10 | (headscip-shell system . . head. -n3 "${file}" | grepscip-shell system . . grep. -Eq "(Copyright|generated|GENERATED)") || (echoscip-shell system . . echo. "${file}:missing license header" && ret=1) |
| 11 | done |
| 12 | |
| 13 | exit $ret |