mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-08-01 09:17:43 +03:00
fix: normalize CRLF in email-strategist + guard linter against CRLF (#561)
marketing/marketing-email-strategist.md (#509) landed with CRLF line endings, which violate .gitattributes (*.md text eol=lf) and broke ./scripts/lint-agents.sh — head -1 saw "---\r" and reported a confusing "missing frontmatter opening ---" on a file that visibly starts with ---. - Normalize that file to LF (content-neutral; 0 non-whitespace changes). - Add a CRLF guard to lint-agents.sh that fails fast with a clear, actionable message instead of the misleading frontmatter error. Thanks @hedonnn for the Email Marketing Strategist agent — great content; just needed the line endings normalized. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
fb65f61d80
commit
b8270c29e3
@@ -58,6 +58,15 @@ lint_file() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 0. Reject CRLF line endings (repo standard is LF — see .gitattributes).
|
||||||
|
# A trailing \r otherwise makes the frontmatter check below fail with a
|
||||||
|
# confusing "missing frontmatter ---" even when the file clearly starts ---.
|
||||||
|
if LC_ALL=C grep -q $'\r' "$file"; then
|
||||||
|
echo "ERROR $file: CRLF line endings detected — convert to LF (e.g. 'perl -i -pe \"s/\\r\$//\" $file'); repo uses LF per .gitattributes"
|
||||||
|
errors=$((errors + 1))
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# 1. Check frontmatter delimiters
|
# 1. Check frontmatter delimiters
|
||||||
local first_line
|
local first_line
|
||||||
first_line=$(head -1 "$file")
|
first_line=$(head -1 "$file")
|
||||||
|
|||||||
Reference in New Issue
Block a user