Skip to content

codegen: keep generated fixtures on LF - #340

Open
dajiaohuang wants to merge 1 commit into
heygen-com:mainfrom
dajiaohuang:fix/codegen-golden-crlf
Open

dajiaohuang wants to merge 1 commit into
heygen-com:mainfrom
dajiaohuang:fix/codegen-golden-crlf

Conversation

@dajiaohuang

Copy link
Copy Markdown

Description

On Windows with core.autocrlf=true, the codegen golden tests compare LF generated output with CRLF checked-in fixtures, and the surface allowlist regex sees the carriage return. Add a repository-level text policy that keeps text files on LF so a clean Windows checkout passes the same tests without changing generated source or runtime behavior. Fixes #339.

Testing

In a fresh clone of this branch with core.autocrlf=true, go test ./codegen -run TestGoldenFiles|TestSurfaceAllowlistCoversEveryTemplateField|TestSurfaceAllowlistMatchesRealGeneratedLines -count=1 passes all 6 tests. The full go test ./... run reports 1,159 passed, 2 failed, and 6 skipped; the two failures invoke WSL bash, which is unavailable in this native Windows environment.

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.

codegen: golden tests fail on Windows with autocrlf

1 participant