From ebd876b0857029ce2414ee7eae46aeb7c6493f0d Mon Sep 17 00:00:00 2001 From: reachableceo Date: Thu, 3 Sep 2026 21:23:57 -0500 Subject: [PATCH] fix(rules): conflict-marker check false-positived on decorative banners [#769] Tightened to exact git markers: 7-char = alone, <<<<<<< / >>>>>>> with ref. https://projects.knownelement.com/issues/769#note-4152 --- scripts/check-rules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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