From 4cbd722074f1883b9818dc31f235eb76663973f7 Mon Sep 17 00:00:00 2001 From: Huanqi Cao Date: Sun, 5 Jul 2026 17:04:35 +0800 Subject: [PATCH] Declare LF and final-newline conventions in .editorconfig Pairs with .gitattributes: eol=lf pins what git produces at checkout; .editorconfig pins what editors write to disk - the one CRLF vector git's filters cannot reach (git never rewrites the working tree, so an editor-written CRLF file would persist with a clean status while the doc gates misbehave on it). insert_final_newline declares the existing one-trailing-newline policy (AGENTS.md, gated by git diff --check) at the editor layer too. (cherry picked from commit 7a09602fd76efff81a0875fb177289004c3dfc9b) --- .editorconfig | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..1c17d31b2c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +# Editor-side declaration of the repo's text conventions. Pairs with +# .gitattributes: that file pins what GIT produces (LF checkouts), this one +# pins what EDITORS write to disk — the one path git's filters cannot reach. +root = true + +[*] +end_of_line = lf +insert_final_newline = true