Restore the CRLF-default line-ending model and pin the Dockerfile - #41
Conversation
The hub's model is a CRLF default with declared LF exceptions. This repo
had dropped the `[*]` `end_of_line = crlf` default and enumerated CRLF per
file type instead, which produces the same result for the types it listed
and leaves every other type with no declared ending at all: `.slnx`, the
`.code-workspace`, `LICENSE`, `.gitignore`, `.dockerignore`, and
`.editorconfig` itself were all uncovered. Restoring the default covers
them and makes the per-type CRLF lines redundant, so they go, along with
the `[*.{json,jsonc}]` and `[*.{cmd,bat,ps1}]` sections that carried
nothing else.
Two LF pins were missing, and one of them matters. `Docker/Dockerfile` had
no pin in either file although this repo ships one, and a CRLF there breaks
RUN heredocs and line continuations. It is LF in the tree today, so intent
held by accident rather than by rule; the pin is what keeps it that way
through a checkout or a renormalize. `.husky/pre-commit` is an
extensionless shebang script that matches no extension rule, so the CRLF
default would have claimed it. `.gitattributes` already pinned it and
`.editorconfig` did not, which is exactly the gap the restored default
exposes.
`.gitattributes` itself was LF while the hub's is CRLF, and under the
restored default that is a violation of the repo's own rule, so it is
rewritten as CRLF. Its comments regain the configure, renormalize, and
inspect commands the hub carries.
The hub's `catalog/`, `.github/actions/`, `scripts/*.py`,
`host-setup/`, `spec/*.py` and `uv.lock` pins are hub-only paths and stay
out.
Verified: `editorconfig-checker` passes over the whole tree, and
`git add --renormalize .` stages nothing beyond these two files, so the
new pins describe the tree exactly rather than proposing a conversion.
`git check-attr` confirms the Dockerfile pin resolves.
Audit run 2026-08-03T16:52:36Z, hub 1ed0cc8, against develop@39c896b.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #41 +/- ##
========================================
Coverage 43.37% 43.37%
========================================
Files 28 28
Lines 3896 3896
Branches 306 306
========================================
Hits 1690 1690
Misses 2154 2154
Partials 52 52 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR restores the repository’s line-ending governance model by reintroducing a CRLF default in .editorconfig and explicitly pinning LF-only exceptions that must remain LF (notably Dockerfiles and execution-sensitive scripts/hooks). This aligns checkout/editor behavior with the intended “CRLF by default, LF by exception” approach and prevents accidental CRLF conversions that can break shell hooks and Dockerfile parsing.
Changes:
- Restore
[*] end_of_line = crlfin.editorconfigand remove redundant per-type CRLF declarations. - Add explicit LF pins for
.husky/pre-commitand Dockerfiles in.editorconfig. - Add git-enforced LF pins for Dockerfiles in
.gitattributes(alongside existing LF pins for shell scripts and the Husky hook).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.gitattributes |
Adds git-enforced LF pinning for Dockerfiles and expands guidance comments while keeping * -text default behavior. |
.editorconfig |
Reintroduces CRLF as the default line ending and declares LF exceptions for workflows, shell scripts, Husky hook, and Dockerfiles. |
.editorconfigand.gitattributesare intent-fidelity carries withintentRef: GOVERNANCE.md#line-endings, so the mechanical audit does not compare them. This repo had diverged from the hub's model, and one of the gaps has a live consequence.Audit run
2026-08-03T16:52:36Z | hub 1ed0cc8, read againstdevelop@39c896b.The default was missing
The hub's model is a CRLF default with declared LF exceptions. This repo had dropped the
[*]end_of_line = crlfdefault and enumerated CRLF per file type instead. Same result for the types it listed, but every other type had no declared ending at all:PhotoCleaner.slnx,PhotoCleaner.code-workspace,LICENSE,.gitignore,.dockerignore, and.editorconfigitself.Restoring the default covers them and makes the per-type CRLF lines redundant, so they go, along with
[*.{json,jsonc}]and[*.{cmd,bat,ps1}], which carried nothing else.Two missing LF pins, one that matters
Docker/Dockerfilehad no pin in either file, although this repo ships one. A CRLF there breaksRUNheredocs and line continuations. It is LF in the tree today, so intent held by accident rather than by rule - the pin is what keeps it that way through a checkout or agit add --renormalize..husky/pre-commitis an extensionless shebang script matching no extension rule, so the restored CRLF default would have claimed it..gitattributesalready pinned it and.editorconfigdid not - exactly the gap the default exposes..gitattributeswas itself LFThe hub's is CRLF, and under the restored default an LF
.gitattributesviolates the repo's own rule, so it is rewritten as CRLF. Its comments regain thecore.autocrlf,git add --renormalize ., andgit ls-files --eolguidance the hub carries.The hub's
catalog/,.github/actions/,scripts/*.py,host-setup/,spec/*.pyanduv.lockpins are hub-only paths and stay out.Verification
editorconfig-checkerpasses over the whole tree under the new rules.git add --renormalize .stages nothing beyond these two files. The new pins describe the tree exactly rather than proposing a conversion, which is the check that matters here - a wrong pin would show up as a mass re-ending.git check-attr text eol -- Docker/Dockerfilenow reportstext: set/eol: lf, where it previously reportedattr/-text.git ls-files --eolshows LF only for the pinned set plus.github/workflows/**.dotnet husky runclean, hub prose gate clean on the changed lines.Third of four in the round. Follows #39 and #40.
🤖 Generated with Claude Code