From 83a4f9fe303c322a9888d16ff20b09f8d8f63404 Mon Sep 17 00:00:00 2001 From: "Euchie." <2295284304@qq.com> Date: Mon, 26 Oct 2026 12:15:23 +0800 Subject: [PATCH] fix(build): check Go sources out with LF on every platform core.autocrlf=true is the default on Windows, so every .go file was checked out with CRLF and gofmt -l listed the whole tree. The gofmt gate in CI runs on Linux, where the checkout is already LF, so the breakage only ever showed up for Windows contributors and only before they had edited a single line. Pinning eol=lf for *.go makes the Windows checkout byte-identical to what the gate expects. --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index 552ec96..c79a4d5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,9 @@ # script with CRLF line endings does not run. internal/kitew/kitew text eol=lf internal/kitew/kitew.ps1 text eol=lf + +# Go sources check out with LF on every platform. The gofmt gate in CI +# rejects a file whose line endings differ from LF, so a Windows checkout +# under core.autocrlf=true would otherwise fail that gate on every file +# before a single line was edited. +*.go text eol=lf