ci: add .gitattributes to pin line endings to LF#1234
Merged
Conversation
Without an explicit .gitattributes, Windows checkouts default to core.autocrlf=true, which converts LF to CRLF on checkout. deno fmt --check then reports every text file with "Text differed by line endings" and aborts the pipeline before deno check / test / compile can run. This file is invisible on macOS/Linux (existing files already have LF) but ensures Windows clones — including the cross-platform-builds workflow — get LF, unblocking the rest of the cross-platform pipeline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
Blocking Issues
None.
Suggestions
- Consider adding more common binary extensions (e.g.,
*.ico binary,*.woff binary,*.woff2 binary,*.wasm binary) to avoid relying on auto-detection for those types. Low priority sincetext=autohandles auto-detection well — the explicit entries are a belt-and-suspenders measure, and the current set covers what's likely to appear in this repo.
Clean, minimal change. The * text=auto eol=lf directive is the standard fix for Windows CRLF issues, and the explicit binary markers for image/archive formats are appropriate. No CLAUDE.md conventions apply to this file type (no TypeScript, no tests needed, no import boundaries). LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a top-level
.gitattributesthat pins all text files to LF line endings. Without this, Windows checkouts default tocore.autocrlf=true, converting LF → CRLF and trippingdeno fmt --check.Motivation
The first manually-triggered run of the Cross Platform Builds workflow (added in #1233) showed Windows failing at step 4 (
deno fmt --check) on every text file withText differed by line endings. macOS came back fully green. Withdeno fmtfailing, the rest of the pipeline (deno check,deno test,deno task compile) is shadowed and can't be observed.This PR is the prerequisite for surfacing the actual Windows code-level failures.
Effect
deno fmt --checkwill pass on text files.Test plan
main.deno fmt --checknow passes onwindows-latest.deno check,deno test, orcompile) to inform the next Windows-support PR.🤖 Generated with Claude Code