#!/bin/bash # Run this from the repository root: # # .github/codecov-ignore-generated.sh >> .github/codecov.yml find . -name "*.go" | while read -r file; do if head -n 1 "$file" | grep -q "Code generated by"; then echo " - \"$file\"" fi done