Make ECP lint runner-compatible
Some checks failed
ci-gates / checks (push) Failing after 1m41s
deploy-cloudflare / checks (push) Successful in 1m58s
deploy-cloudflare / deploy (push) Failing after 6s

This commit is contained in:
Conrad Kramer 2026-06-10 03:41:11 -07:00
parent d7f76d6ab2
commit 0c41193867
No known key found for this signature in database
4 changed files with 12 additions and 1 deletions

View file

@ -28,7 +28,13 @@ check_pattern() {
local file="$1"
local regex="$2"
local message="$3"
if ! rg -q --pcre2 "${regex}" "${file}"; then
local found=1
if command -v rg >/dev/null 2>&1; then
rg -q --pcre2 "${regex}" "${file}" && found=0
else
grep -Pq "${regex}" "${file}" && found=0
fi
if (( found != 0 )); then
echo "ecp-lint: ${file}: ${message}" >&2
errors=$((errors + 1))
fi