diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-08 10:04:47 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-08 10:12:46 +0200 |
commit | 7d03b1de0b7a2f7a7972716a40277c7aa231f542 (patch) | |
tree | b281f3e370dfa5339f7275e407bd9e5682435f2e /modules/gdscript | |
parent | 17a81260cb92a321a0d752e369ef911055178c7b (diff) | |
download | redot-engine-7d03b1de0b7a2f7a7972716a40277c7aa231f542.tar.gz |
Style: Trim trailing whitespace and ensure newline at EOF
Found by apply the file_format checks again via #91597.
Diffstat (limited to 'modules/gdscript')
25 files changed, 27 insertions, 31 deletions
diff --git a/modules/gdscript/README.md b/modules/gdscript/README.md index 865475d37d..a4367b39ff 100644 --- a/modules/gdscript/README.md +++ b/modules/gdscript/README.md @@ -136,4 +136,4 @@ There are many other classes in the GDScript module. Here is a brief overview of - The [virtual machine](gdscript_vm.cpp) is essentially defined as calling `GDScriptFunction::call()`. - Editor-related functions can be found in parts of `GDScriptLanguage`, originally declared in [`gdscript.h`](gdscript.h) but defined in [`gdscript_editor.cpp`](gdscript_editor.cpp). Code highlighting can be found in [`GDScriptSyntaxHighlighter`](editor/gdscript_highlighter.h). - GDScript decompilation is found in [`gdscript_disassembler.cpp`](gdscript_disassembler.h), defined as `GDScriptFunction::disassemble()`. -- Documentation generation from GDScript comments in [`GDScriptDocGen`](editor/gdscript_docgen.h)
\ No newline at end of file +- Documentation generation from GDScript comments in [`GDScriptDocGen`](editor/gdscript_docgen.h) diff --git a/modules/gdscript/tests/scripts/analyzer/features/cast_enum_to_int.gd b/modules/gdscript/tests/scripts/analyzer/features/cast_enum_to_int.gd index 77ef9e2073..f861cadb5d 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/cast_enum_to_int.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/cast_enum_to_int.gd @@ -6,4 +6,3 @@ func test(): var a := Foo.A var b := a as int + 1 print(b) - diff --git a/modules/gdscript/tests/scripts/analyzer/features/preload_constant_types_are_inferred.gd b/modules/gdscript/tests/scripts/analyzer/features/preload_constant_types_are_inferred.gd index 9d0324ead8..738b5f7b3a 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/preload_constant_types_are_inferred.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/preload_constant_types_are_inferred.gd @@ -3,4 +3,3 @@ const Constants = preload("gdscript_to_preload.notest.gd") func test(): var a := Constants.A print(a) - diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_class_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_class_scene.cfg index 009ab9f9ce..9c580b711d 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_class_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_class_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; GDScript: class_a.notest.gd {"display": "property_of_a"}, {"display": "func_of_a"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_native_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_native_scene.cfg index 0fb46a4704..446198dd35 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_native_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_native_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; AnimationPlayer {"display": "autoplay"}, {"display": "play"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_class_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_class_scene.cfg index 009ab9f9ce..9c580b711d 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_class_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_class_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; GDScript: class_a.notest.gd {"display": "property_of_a"}, {"display": "func_of_a"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_native_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_native_scene.cfg index 0fb46a4704..446198dd35 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_native_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_native_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; AnimationPlayer {"display": "autoplay"}, {"display": "play"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_interfered_scene/class_local_interfered_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_interfered_scene/class_local_interfered_scene.cfg index 009ab9f9ce..9c580b711d 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/local_interfered_scene/class_local_interfered_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/local_interfered_scene/class_local_interfered_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; GDScript: class_a.notest.gd {"display": "property_of_a"}, {"display": "func_of_a"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_interfered_scene/native_local_interfered_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_interfered_scene/native_local_interfered_scene.cfg index 0fb46a4704..446198dd35 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/local_interfered_scene/native_local_interfered_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/local_interfered_scene/native_local_interfered_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; AnimationPlayer {"display": "autoplay"}, {"display": "play"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_scene/class_local_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_scene/class_local_scene.cfg index 009ab9f9ce..9c580b711d 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/local_scene/class_local_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/local_scene/class_local_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; GDScript: class_a.notest.gd {"display": "property_of_a"}, {"display": "func_of_a"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_scene/native_local_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_scene/native_local_scene.cfg index 0fb46a4704..446198dd35 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/local_scene/native_local_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/local_scene/native_local_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; AnimationPlayer {"display": "autoplay"}, {"display": "play"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint/class_local_typehint.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint/class_local_typehint.cfg index a72b489be6..8b68d51a89 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint/class_local_typehint.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint/class_local_typehint.cfg @@ -4,7 +4,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; GDScript: class_a.notest.gd {"display": "property_of_a"}, {"display": "func_of_a"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint/native_local_typehint.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint/native_local_typehint.cfg index adf06c8707..72c0549d3b 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint/native_local_typehint.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint/native_local_typehint.cfg @@ -4,7 +4,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; AnimationPlayer {"display": "autoplay"}, {"display": "play"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_interfered_scene/class_member_interfered_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_interfered_scene/class_member_interfered_scene.cfg index 009ab9f9ce..9c580b711d 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/member_interfered_scene/class_member_interfered_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/member_interfered_scene/class_member_interfered_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; GDScript: class_a.notest.gd {"display": "property_of_a"}, {"display": "func_of_a"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_interfered_scene/native_member_interfered_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_interfered_scene/native_member_interfered_scene.cfg index 0fb46a4704..446198dd35 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/member_interfered_scene/native_member_interfered_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/member_interfered_scene/native_member_interfered_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; AnimationPlayer {"display": "autoplay"}, {"display": "play"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_scene/class_member_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_scene/class_member_scene.cfg index 009ab9f9ce..9c580b711d 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/member_scene/class_member_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/member_scene/class_member_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; GDScript: class_a.notest.gd {"display": "property_of_a"}, {"display": "func_of_a"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_scene/native_member_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_scene/native_member_scene.cfg index 0fb46a4704..446198dd35 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/member_scene/native_member_scene.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/member_scene/native_member_scene.cfg @@ -6,7 +6,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; AnimationPlayer {"display": "autoplay"}, {"display": "play"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint/class_member_typehint.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint/class_member_typehint.cfg index a72b489be6..8b68d51a89 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint/class_member_typehint.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint/class_member_typehint.cfg @@ -4,7 +4,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; GDScript: class_a.notest.gd {"display": "property_of_a"}, {"display": "func_of_a"}, diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint/native_member_typehint.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint/native_member_typehint.cfg index adf06c8707..72c0549d3b 100644 --- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint/native_member_typehint.cfg +++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint/native_member_typehint.cfg @@ -4,7 +4,7 @@ include=[ {"display": "add_child"}, {"display": "owner"}, {"display": "child_entered_tree"}, - + ; AnimationPlayer {"display": "autoplay"}, {"display": "play"}, diff --git a/modules/gdscript/tests/scripts/lsp/lambdas.gd b/modules/gdscript/tests/scripts/lsp/lambdas.gd index 6f5d468eea..fbee264f3b 100644 --- a/modules/gdscript/tests/scripts/lsp/lambdas.gd +++ b/modules/gdscript/tests/scripts/lsp/lambdas.gd @@ -7,7 +7,7 @@ var lambda_member1 := func(alpha: int, beta): return alpha + beta # | | ^^^^^ \1:alpha -> \1:alpha # ^^^^^^^^^^^^^^ \1 -> \1 -var lambda_member2 := func(alpha, beta: int) -> int: +var lambda_member2 := func(alpha, beta: int) -> int: # | | | | | | # | | | | | | # | | | | ^^^^ \2:beta -> \2:beta @@ -76,7 +76,7 @@ func _ready() -> void: # | | | | ^^^^ \local:beta -> \local:beta # | | ^^^^^ \local:alpha -> \local:alpha # ^^^^^^^^^^^^ \local -> \local - + var value := 42 # ^^^^^ local:value -> local:value var lambda_capture = func(): return value + some_name.length() diff --git a/modules/gdscript/tests/scripts/lsp/local_variables.gd b/modules/gdscript/tests/scripts/lsp/local_variables.gd index b6cc46f7da..43e8937800 100644 --- a/modules/gdscript/tests/scripts/lsp/local_variables.gd +++ b/modules/gdscript/tests/scripts/lsp/local_variables.gd @@ -9,7 +9,7 @@ func test_member() -> void: # ^^^^ test -> test test += 3 #<^^ -> test - member += 5 + member += 5 #<^^^^ -> member test = return_arg(test) # | ^^^^ -> test @@ -22,4 +22,4 @@ func return_arg(arg: int) -> int: arg += 2 #<^ -> arg return arg - # ^^^ -> arg
\ No newline at end of file + # ^^^ -> arg diff --git a/modules/gdscript/tests/scripts/lsp/properties.gd b/modules/gdscript/tests/scripts/lsp/properties.gd index 8dfaee2e5b..1acaddbe2c 100644 --- a/modules/gdscript/tests/scripts/lsp/properties.gd +++ b/modules/gdscript/tests/scripts/lsp/properties.gd @@ -16,7 +16,7 @@ var prop3 := 42: #<^^^ -> prop3 var prop4: int: # ^^^^^ prop4 -> prop4 - get: + get: return 42 var prop5 := 42: # ^^^^^ prop5 -> prop5 diff --git a/modules/gdscript/tests/scripts/lsp/scopes.gd b/modules/gdscript/tests/scripts/lsp/scopes.gd index 20b8fb9bd7..9314ab427c 100644 --- a/modules/gdscript/tests/scripts/lsp/scopes.gd +++ b/modules/gdscript/tests/scripts/lsp/scopes.gd @@ -68,16 +68,16 @@ func m(): match value: # ^^^^^ -> m:value - 13: + 13: print(value) # ^^^^^ -> m:value - [var start, _, var end]: + [var start, _, var end]: # | | ^^^ m:match:array:end -> m:match:array:end # ^^^^^ m:match:array:start -> m:match:array:start print(start + end) # | | ^^^ -> m:match:array:end # ^^^^^ -> m:match:array:start - { "name": var name }: + { "name": var name }: # ^^^^ m:match:dict:var -> m:match:dict:var print(name) # ^^^^ -> m:match:dict:var @@ -87,10 +87,10 @@ func m(): # ^^^^^^^^ -> m:match:var func m2(): - var value = 42 + var value = 42 # ^^^^^ m2:value -> m2:value - match value: + match value: # ^^^^^ -> m2:value { "name": var name }: # ^^^^ m2:match:dict:var -> m2:match:dict:var diff --git a/modules/gdscript/tests/scripts/parser/features/match_multiple_patterns_with_array.gd b/modules/gdscript/tests/scripts/parser/features/match_multiple_patterns_with_array.gd index a278ea1154..24f4c14f50 100644 --- a/modules/gdscript/tests/scripts/parser/features/match_multiple_patterns_with_array.gd +++ b/modules/gdscript/tests/scripts/parser/features/match_multiple_patterns_with_array.gd @@ -23,4 +23,3 @@ func test(): bar([3]) bar([4]) bar([5]) - diff --git a/modules/gdscript/tests/scripts/runtime/features/call_native_static_method_validated.gd b/modules/gdscript/tests/scripts/runtime/features/call_native_static_method_validated.gd index 35e4dbd6a0..a1a9e350b0 100644 --- a/modules/gdscript/tests/scripts/runtime/features/call_native_static_method_validated.gd +++ b/modules/gdscript/tests/scripts/runtime/features/call_native_static_method_validated.gd @@ -4,4 +4,3 @@ func test(): # Validated native static call without return value. Node.print_orphan_nodes() - |