Skip to content

chore: check text files out with LF so Windows clones pass lint - #175

Merged
jerelvelarde merged 1 commit into
CopilotKit:mainfrom
BigDataDZ:chore/gitattributes-lf-checkout
Oct 25, 2026
Merged

jerelvelarde merged 1 commit into
CopilotKit:mainfrom
BigDataDZ:chore/gitattributes-lf-checkout

Conversation

@BigDataDZ

Copy link
Copy Markdown
Contributor

Problem

On a fresh Windows clone with the default core.autocrlf=true, every text file is checked out with CRLF. Biome's formatter expects LF, so pnpm lint reports 172 formatter errors before any code change (Checked 172 files... Found 172 errors), which blocks the Checks before a pull request list in CONTRIBUTING.md for Windows contributors through no fault of their own.

The index is already fully normalized (git ls-files --eol: 210 text files at i/lf, 16 binaries at i/-text), so only the checkout smudge is affected.

Resulting behavior

.gitattributes moves * text=auto to * text=auto eol=lf:

  • Windows clones check text files out with LF regardless of core.autocrlf, so pnpm lint passes on a fresh clone.
  • Linux/macOS checkouts are unchanged (they were already LF).
  • The *.png / *.mp4 / *.pdf binary rules are untouched.
  • No in-repo file contents change; the diff is the one attribute line.

Verification

On Windows 10 (10.0.18363), Node 24.20.0, pnpm 11.19.0:

  1. Set the repo to core.autocrlf=true (the Windows default), force a re-checkout (git rm --cached -r . && git reset --hard) with this change present.
  2. Files land as LF (file reports plain text, no CRLF), and pnpm lint exits 0 (172 files checked, 0 errors).
  3. pnpm typecheck exits 0; git status stays clean.

AI-use note: diagnosis and this PR were prepared with an AI assistant's help; the reproduction steps above are verified on my machine.

Biome expects LF, but a fresh Windows clone with the default
core.autocrlf=true produced CRLF working trees and ~172 formatter
errors before any code change. eol=lf pins the checkout to LF for
text files; the binary rules are unchanged and Linux/macOS checkouts
are unaffected.

@jerelvelarde jerelvelarde left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Value/template fit: focused checkout fix for Windows contributors; binary attributes and repository contents remain unchanged. The description documents the actual problem, reproduction, and platform limits.

Security: no actionable security findings. No dependencies, executable hooks, credentials, runtime authorization, or workflow permissions change.

Verification: inspected the exact one-line diff; the prior isolated Git fixture verified LF checkout under core.autocrlf=true and byte-preserved PNG content on macOS. Windows behavior is also documented by the contributor. CI execution approved; merge is gated on all seven required checks.

@jerelvelarde
jerelvelarde merged commit f8c233f into CopilotKit:main Oct 25, 2026
7 checks passed
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.

2 participants