fix: normalize CRLF in email-strategist + guard linter against CRLF

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:
Michael Sitarzewski
2026-06-03 19:34:09 -05:00
parent fb65f61d80
commit 0f6553d005
2 changed files with 258 additions and 249 deletions
+9
View File
@@ -58,6 +58,15 @@ lint_file() {
return
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
local first_line
first_line=$(head -1 "$file")