diff --git a/scripts/check-rules.sh b/scripts/check-rules.sh index 2d8bc23..c112383 100755 --- a/scripts/check-rules.sh +++ b/scripts/check-rules.sh @@ -234,7 +234,7 @@ $RULE_VERBOSE && log_step "File hygiene" if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then # archive/ excluded: legacy files are preserved verbatim and may contain # decorative `====` banners that false-positive as conflict markers. - CONFLICT="$(git diff --cached --name-only --diff-filter=ACM 2>/dev/null | grep -v '^archive/' | xargs -r grep -lE '^(<<<<<<<|=======|>>>>>>>)' 2>/dev/null || true)" + CONFLICT="$(git diff --cached --name-only --diff-filter=ACM 2>/dev/null | grep -v '^archive/' | xargs -r grep -lE '^(<{7}( \S+)?|=======|>{7}( \S+)?)$' 2>/dev/null || true)" if [ -z "$CONFLICT" ]; then check "No merge-conflict markers staged" "pass"; else check "Merge-conflict markers staged: $CONFLICT" "fail"; fi fi