Skip to content

Enforce LF line endings via .gitattributes and normalize existing files#550

Open
SRombauts wants to merge 4 commits into
masterfrom
feature-enforce-lf-line-endings
Open

Enforce LF line endings via .gitattributes and normalize existing files#550
SRombauts wants to merge 4 commits into
masterfrom
feature-enforce-lf-line-endings

Conversation

@SRombauts

Copy link
Copy Markdown
Owner

Summary

The repo declares end_of_line = lf in .editorconfig, but nothing enforced it at the git level (no .gitattributes, core.autocrlf=false). As a result, 12 tracked files had drifted to CRLF or mixed line endings in the committed blobs, in violation of the policy.

This PR adds the missing enforcement and normalizes the offenders.

Changes (one theme per commit)

  1. Add .gitattributes* text=auto eol=lf so git normalizes line endings on commit/checkout regardless of contributor OS, editor, or tooling; *.db3/*.png marked binary. Also cross-references the enforcement in the sqlitecpp-coding-standards skill.
  2. Normalize test sourcestests/Database_test.cpp, tests/Transaction_test.cpp.
  3. Normalize build/CMake configmeson_options.txt, examples/example2/CMakeLists.txt, cmake/SQLiteCppConfig.cmake.in, subprojects/.gitignore.
  4. Normalize docs & textREADME.md, examples/example1/README.md, examples/example2/README.md, sqlite3/README.md, LICENSE.txt, .github/copilot-instructions.md.

Notes for review

Declare `* text=auto eol=lf` so git normalizes line endings on commit and
checkout regardless of contributor OS, editor, or tooling, matching the
existing .editorconfig policy (end_of_line = lf). Mark *.db3 and *.png as
binary so they are never normalized.

Cross-reference the enforcement in the sqlitecpp-coding-standards skill.
Re-normalize the two unit test files that were committed with CRLF, per the
new .gitattributes policy. No content changes (eol only).
Re-normalize meson_options.txt, the example2 CMakeLists.txt, the
SQLiteCppConfig.cmake.in template, and subprojects/.gitignore, which were
committed with CRLF/mixed endings. No content changes (eol only).
Re-normalize README.md, the example and sqlite3 README files, LICENSE.txt,
and the Copilot instructions, which were committed with CRLF/mixed endings.
No content changes (eol only).
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.

1 participant