From 2601ce2bc50931fc21eb8a3b8c2a4cb9817bc428 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 18 Oct 2023 23:05:20 -0400 Subject: [PATCH 1/2] Consistent line-endings in editors --- .editorconfig | 10 ++++++---- .vscode/settings.default.json | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index 5394de3d7fed..49b78217f12c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,12 +1,14 @@ root = true -[*.{py,pyi,rst,md,yml,yaml,toml,json,txt}] +[*] trim_trailing_whitespace = true insert_final_newline = true indent_style = space +end_of_line = lf +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false [*.{py,pyi,toml,json}] indent_size = 4 - -[*.{yml,yaml}] -indent_size = 2 diff --git a/.vscode/settings.default.json b/.vscode/settings.default.json index 32bbd68a3924..6f0b0630e968 100644 --- a/.vscode/settings.default.json +++ b/.vscode/settings.default.json @@ -24,6 +24,7 @@ "**/.*_cache": true, // mypy and Ruff cache "**/__pycache__": true }, + "files.eol": "\n", "files.insertFinalNewline": true, "files.trimFinalNewlines": true, "files.trimTrailingWhitespace": true, @@ -31,7 +32,7 @@ "editor.insertSpaces": true, "editor.detectIndentation": false, "editor.tabSize": 2, - "[json][jsonc][python]": { + "[json][jsonc][python][toml]": { "editor.tabSize": 4 }, "editor.rulers": [ From 4bc528766cc7ac3cacf39cfaa1434001756e1784 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 18 Oct 2023 23:38:41 -0400 Subject: [PATCH 2/2] Try eol=lf .gitattributes --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 205396b4eb43..17a1d7ab9ec1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,6 @@ +# Normalize EOF +* autocrlf=false +* eol=lf # Set linguist-language to support comments syntax highlight **/stubtest_allowlist*.txt linguist-language=ini tests/stubtest_allowlists/*.txt linguist-language=ini