Skip to content

Commit 9119b52

Browse files
committed
just check the whole repo
1 parent 788982b commit 9119b52

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,8 @@ jobs:
109109

110110
- name: Check for CRLF line endings
111111
run: |
112-
CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }} HEAD)
113-
if [ -z "$CHANGED" ]; then
114-
exit 0
115-
fi
116-
CRLF_FILES=$(echo "$CHANGED" | xargs -I{} sh -c '[ -f "{}" ] && git grep -Il $'"'"'\r'"'"' -- "{}" 2>/dev/null || true')
117-
if [ -n "$CRLF_FILES" ]; then
118-
echo "::error::CRLF line endings detected in the following files:"
119-
echo "$CRLF_FILES"
120-
echo ""
121-
echo "Fix with: git add --renormalize . && git commit -m 'chore: normalize line endings'"
112+
if git grep -Il $'\r' -- '*.mdx' '*.md' '*.json' '*.yml' '*.yaml' '*.ts' '*.js' '*.astro' '*.css' '*.tsx' '*.mjs' '*.toml' '*.txt' '*.svg' '*.html'; then
113+
echo "::error::CRLF line endings detected. Configure your editor to use LF line endings (this repo has an .editorconfig file that most editors respect automatically)."
122114
exit 1
123115
fi
124116

0 commit comments

Comments
 (0)