From bf811db6c83dee6b3138c69d1dbc1a2adcc98f4e Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Fri, 13 Sep 2024 10:11:59 -0500 Subject: [PATCH] Style: Consolidate & migrate GDScript `.editorconfig` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Moved to test project root so a new `.editorconfig` isn't constantly generated. • Disable attributes only in the files which use invalid syntax deliberately --- modules/gdscript/.editorconfig | 5 ----- modules/gdscript/tests/scripts/.editorconfig | 12 ++++++++++++ modules/gdscript/tests/scripts/parser/.editorconfig | 2 -- 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 modules/gdscript/tests/scripts/.editorconfig delete mode 100644 modules/gdscript/tests/scripts/parser/.editorconfig diff --git a/modules/gdscript/.editorconfig b/modules/gdscript/.editorconfig index 640c2050937..b380846f863 100644 --- a/modules/gdscript/.editorconfig +++ b/modules/gdscript/.editorconfig @@ -1,8 +1,3 @@ [*.gd] -indent_style = tab indent_size = 4 -insert_final_newline = true trim_trailing_whitespace = true - -[*.out] -insert_final_newline = true diff --git a/modules/gdscript/tests/scripts/.editorconfig b/modules/gdscript/tests/scripts/.editorconfig new file mode 100644 index 00000000000..da1efefe3c4 --- /dev/null +++ b/modules/gdscript/tests/scripts/.editorconfig @@ -0,0 +1,12 @@ +# This file is required to workaround `.editorconfig` autogeneration (see #96845). + +# Some tests handle invalid syntax deliberately; exclude relevant attributes. + +[parser/features/mixed_indentation_on_blank_lines.gd] +trim_trailing_whitespace = false + +[parser/warnings/empty_file_newline.notest.gd] +insert_final_newline = false + +[parser/warnings/empty_file_newline_comment.notest.gd] +insert_final_newline = false diff --git a/modules/gdscript/tests/scripts/parser/.editorconfig b/modules/gdscript/tests/scripts/parser/.editorconfig deleted file mode 100644 index fa43b3ad781..00000000000 --- a/modules/gdscript/tests/scripts/parser/.editorconfig +++ /dev/null @@ -1,2 +0,0 @@ -[*.{gd,out}] -trim_trailing_whitespace = false