concrete/workspace/crlf-text
A text file in the workspace has CRLF line endings, so the same commit would build a different version than an LF checkout.
A text file in the workspace has CRLF line endings, so the same commit would build a different version than an LF checkout.
Graded by the workspace stage of concrete check, in the tree venue. A violation reports this id and the file it failed at — see every rule and concrete check.
Reason
Concrete versions a template by its bytes: the source digest, every text asset and the
stylesheet's assets are hashed exactly as they sit on disk, never normalized first. A
text file with CRLF line endings therefore builds a different template version than the
same commit checked out with LF, so a Windows checkout under Git's default
core.autocrlf=true would publish new versions of sections nobody changed, and a build
from one machine would never be reused on another. The workspace pins LF instead, in
.gitattributes, and concrete check refuses any text file that still carries a CRLF,
on every OS.
A file counts as text exactly when Git's text=auto would convert it, so the files this
rule names are the files the fix below converts. Images, fonts and other binaries are
never graded.
Fix
Pin LF at the workspace root with a .gitattributes holding one line,
* text=auto eol=lf. A workspace made with npm create @homepages/concrete already has
it. Then convert the files already checked out: commit or stash your work first, since
the last two commands rewrite every tracked file from the commit.
git add .gitattributes
git add --renormalize .
git commit -m "Pin LF line endings"
git rm -r --cached .
git reset --hardA file Git does not track yet is not converted by these commands: switch it to LF in your editor (in VS Code, click CRLF in the status bar and choose LF). Outside a Git repository, do the same for every file the finding names.
Before and after
my-template/
template.ts ← saved with CRLF line endings
sections/hero/section.tsx ← saved with CRLF line endings
package.jsonmy-template/
.gitattributes * text=auto eol=lf
template.ts LF
sections/hero/section.tsx LF
package.jsonconcrete/workspace/duplicate-section-key
Two different exported sections declare the same key.
concrete/workspace/unportable-name
A source file name, the template key, a section key or a fixture id would not name the same file on Windows and macOS: two differ only by case or Unicode form, or one is a reserved device name (`con`, `nul`, `com1`…), ends in a dot or a space, or carries a character Windows refuses in a file name (`:`, `\`, `?`, `*`, a control character…). A key or id must also be NFC.
