Skip to content

Commit 17c53ef

Browse files
author
RandomCrocodile
committed
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.
1 parent 495ee4c commit 17c53ef

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ indent_size = 4
1919
indent_style = space
2020

2121
[*.{cs,vb}]
22+
end_of_line = lf
2223
dotnet_separate_import_directive_groups = false
2324
dotnet_sort_system_directives_first = true
2425
dotnet_style_coalesce_expression = true:suggestion

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Explicitly declare text files we want to always be normalized and converted
55
# to native line endings on checkout.
66
*.config text
7-
*.cs text diff=csharp
7+
*.cs text eol=lf diff=csharp
88
*.manifest text
99
*.md text
1010
*.resx text

0 commit comments

Comments
 (0)