Skip to content

ci: add .gitattributes to pin line endings to LF#1234

Merged
stack72 merged 1 commit intomainfrom
ci/gitattributes-lf
Apr 28, 2026
Merged

ci: add .gitattributes to pin line endings to LF#1234
stack72 merged 1 commit intomainfrom
ci/gitattributes-lf

Conversation

@stack72
Copy link
Copy Markdown
Contributor

@stack72 stack72 commented Apr 28, 2026

Summary

Adds a top-level .gitattributes that pins all text files to LF line endings. Without this, Windows checkouts default to core.autocrlf=true, converting LF → CRLF and tripping deno 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 with Text differed by line endings. macOS came back fully green. With deno fmt failing, 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

  • macOS / Linux: zero change. Existing files already have LF in the index.
  • Windows: fresh checkouts (including CI) get LF. deno fmt --check will pass on text files.
  • Anyone cloning the repo on Windows: same benefit going forward.

Test plan

  • Merge PR.
  • Manually re-trigger the Cross Platform Builds workflow against main.
  • Confirm deno fmt --check now passes on windows-latest.
  • Capture the next failure (likely in deno check, deno test, or compile) to inform the next Windows-support PR.

🤖 Generated with Claude Code

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>
@stack72 stack72 marked this pull request as ready for review April 28, 2026 14:10
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Blocking Issues

None.

Suggestions

  1. 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 since text=auto handles 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.

@stack72 stack72 merged commit 7b46c1b into main Apr 28, 2026
20 of 22 checks passed
@stack72 stack72 deleted the ci/gitattributes-lf branch April 28, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant