From 17c53ef1d446f6ac30f5bf2e615a744b01907649 Mon Sep 17 00:00:00 2001 From: RandomCrocodile Date: Sat, 4 Jul 2026 17:49:31 +0200 Subject: [PATCH] chore: pin .cs line endings to LF for deterministic formatting dotnet format has no end_of_line setting in .editorconfig, so it fell back to the OS default (CRLF on Windows, LF on Linux). Combined with .gitattributes '*.cs text' (native eol on checkout), local 'dotnet format --verify' results depended on each contributor's core.autocrlf, producing spurious whitespace failures on autocrlf=input machines while CI (Windows, autocrlf=true) stayed green. Pin .cs to LF in both .editorconfig (end_of_line = lf) and .gitattributes (*.cs text eol=lf) so formatting is deterministic on every platform. Blobs are already LF, so this is a no-op for file content. --- .editorconfig | 1 + .gitattributes | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 9561aef9f..49490f441 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,6 +19,7 @@ indent_size = 4 indent_style = space [*.{cs,vb}] +end_of_line = lf dotnet_separate_import_directive_groups = false dotnet_sort_system_directives_first = true dotnet_style_coalesce_expression = true:suggestion diff --git a/.gitattributes b/.gitattributes index 45cf1e579..18e806460 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,7 +4,7 @@ # Explicitly declare text files we want to always be normalized and converted # to native line endings on checkout. *.config text -*.cs text diff=csharp +*.cs text eol=lf diff=csharp *.manifest text *.md text *.resx text