Style: Trim trailing whitespace and ensure newline at EOF

Found by apply the file_format checks again via #91597.
This commit is contained in:
Rémi Verschelde
2024-05-08 10:04:47 +02:00
parent 17a81260cb
commit 7d03b1de0b
54 changed files with 54 additions and 66 deletions

View File

@ -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)
- Documentation generation from GDScript comments in [`GDScriptDocGen`](editor/gdscript_docgen.h)

View File

@ -6,4 +6,3 @@ func test():
var a := Foo.A
var b := a as int + 1
print(b)

View File

@ -3,4 +3,3 @@ const Constants = preload("gdscript_to_preload.notest.gd")
func test():
var a := Constants.A
print(a)

View File

@ -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"},

View File

@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},

View File

@ -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"},

View File

@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},

View File

@ -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"},

View File

@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},

View File

@ -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"},

View File

@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},

View File

@ -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"},

View File

@ -4,7 +4,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},

View File

@ -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"},

View File

@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},

View File

@ -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"},

View File

@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},

View File

@ -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"},

View File

@ -4,7 +4,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},

View File

@ -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()

View File

@ -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
# ^^^ -> arg

View File

@ -16,7 +16,7 @@ var prop3 := 42:
#<^^^ -> prop3
var prop4: int:
# ^^^^^ prop4 -> prop4
get:
get:
return 42
var prop5 := 42:
# ^^^^^ prop5 -> prop5

View File

@ -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

View File

@ -23,4 +23,3 @@ func test():
bar([3])
bar([4])
bar([5])

View File

@ -4,4 +4,3 @@ func test():
# Validated native static call without return value.
Node.print_orphan_nodes()