From 79d2904ac73d1ba0013eae9edac6c5b56592ded5 Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Wed, 14 May 2025 16:01:02 -0700 Subject: [PATCH 1/3] Add .editorconfig --- .editorconfig | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..62e5b342 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,38 @@ +root = true + +[*] +charset = utf-8 +insert_final_newline = true +end_of_line = lf +tab_width = 4 + +[*.{swift,swift.gyb,cpp,h}] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.{sh,py}] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[CMakeLists.txt] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.{md,txt}] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.xcconfig] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.pbxproj] +indent_style = tab +tab_width = 4 +indent_size = 4 +trim_trailing_whitespace = true From cb7bb042629122f269699534e6a42a2c59d8df64 Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Wed, 14 May 2025 17:20:05 -0700 Subject: [PATCH 2/3] Fix some omissions --- .editorconfig | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.editorconfig b/.editorconfig index 62e5b342..189c879a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,34 +5,37 @@ charset = utf-8 insert_final_newline = true end_of_line = lf tab_width = 4 +trim_trailing_whitespace = true -[*.{swift,swift.gyb,cpp,h}] +[*.{swift,swift.gyb,cpp,h,yml}] indent_style = space indent_size = 2 -trim_trailing_whitespace = true [*.{sh,py}] indent_style = space indent_size = 4 -trim_trailing_whitespace = true + +[.swiftci/*}] +indent_style = space +indent_size = 4 [CMakeLists.txt] indent_style = space indent_size = 2 -trim_trailing_whitespace = true + +[*.cmake{,.in}] +indent_style = space +indent_size = 2 [*.{md,txt}] indent_style = space indent_size = 2 -trim_trailing_whitespace = true [*.xcconfig] indent_style = space indent_size = 2 -trim_trailing_whitespace = true [*.pbxproj] indent_style = tab tab_width = 4 indent_size = 4 -trim_trailing_whitespace = true From 117a1aad2d8194b8632bb46483573bb0b7aa50f1 Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Thu, 15 May 2025 14:15:30 -0700 Subject: [PATCH 3/3] =?UTF-8?q?Don=E2=80=99t=20set=20a=20global=20tab=20wi?= =?UTF-8?q?dth;=20indent=5Fwidth=20is=20a=20fine=20default=20for=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Still override it to 4 in actual code with indent_size 2, in case we have stray tabs in there somewhere. --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 189c879a..9e89868f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,11 +4,11 @@ root = true charset = utf-8 insert_final_newline = true end_of_line = lf -tab_width = 4 trim_trailing_whitespace = true [*.{swift,swift.gyb,cpp,h,yml}] indent_style = space +tab_width = 4 indent_size = 2 [*.{sh,py}]