crowdsec/.github/generate-codecov-yml.sh
mmetc 9976616773
context propagation: StreamingAcquisition() (#3274)
* context propagation: StreamingAcquisition()
* lint
* ship with codecov.yml
2024-10-11 15:59:10 +02:00

31 lines
635 B
Bash
Executable file

#!/bin/bash
# Run this from the repository root:
#
# .github/generate-codecov-yml.sh >> .github/codecov.yml
cat <<EOT
# we measure coverage but don't enforce it
# https://docs.codecov.com/docs/codecov-yaml
codecov:
require_ci_to_pass: false
coverage:
status:
patch:
default:
target: 0%
project:
default:
target: 0%
# if a directory is ignored, there is no way to un-ignore files like pkg/models/helpers.go
# so we make a full list
ignore:
EOT
find . -name "*.go" | while read -r file; do
if head -n 1 "$file" | grep -q "Code generated by"; then
echo " - \"$file\""
fi
done