Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style: Trim trailing whitespace and ensure newline at EOF #91696

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ CheckOptions:
- key: readability-braces-around-statements.ShortStatementLines
value: '0'
...

1 change: 0 additions & 1 deletion .github/actions/godot-api-dump/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ runs:
with:
name: 'godot-api-dump'
path: './godot-api/*'

2 changes: 1 addition & 1 deletion doc/classes/GDExtensionManager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<return type="int" enum="GDExtensionManager.LoadStatus" />
<param index="0" name="path" type="String" />
<description>
Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED].
Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED].
[b]Note:[/b] You can only reload extensions in the editor. In release builds, this method always fails and returns [constant LOAD_STATUS_FAILED].
</description>
</method>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/GPUParticles2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<method name="restart">
<return type="void" />
<description>
Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling.
Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling.
[b]Note:[/b] The [signal finished] signal is only emitted by [member one_shot] emitters.
</description>
</method>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/Node.xml
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@
[b]Note:[/b] When changing the name, the following characters will be replaced with an underscore: ([code].[/code] [code]:[/code] [code]@[/code] [code]/[/code] [code]"[/code] [code]%[/code]). In particular, the [code]@[/code] character is reserved for auto-generated names. See also [method String.validate_node_name].
</member>
<member name="owner" type="Node" setter="set_owner" getter="get_owner">
The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a [PackedScene], all the nodes it owns are also saved with it.
The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a [PackedScene], all the nodes it owns are also saved with it.
[b]Note:[/b] In the editor, nodes not owned by the scene root are usually not displayed in the Scene dock, and will [b]not[/b] be saved. To prevent this, remember to set the owner after calling [method add_child]. See also (see [member unique_name_in_owner])
</member>
<member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" enum="Node.PhysicsInterpolationMode" default="0">
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/TextEdit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@
<param index="2" name="wrap_index" type="int" default="-1" />
<param index="3" name="caret_index" type="int" default="0" />
<description>
Sets the selection origin line to the [param line] for the given [param caret_index]. If the selection origin is moved to the caret position, the selection will deselect.
Sets the selection origin line to the [param line] for the given [param caret_index]. If the selection origin is moved to the caret position, the selection will deselect.
If [param can_be_hidden] is [code]false[/code], The line will be set to the nearest unhidden line below or above.
If [param wrap_index] is [code]-1[/code], the selection origin column will be clamped to the [param line]'s length. If [param wrap_index] is greater than [code]-1[/code], the column will be moved to attempt to match the visual x position on the line's [param wrap_index] to the position from the last time [method set_selection_origin_column] or [method select] was called.
</description>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/TileMapLayer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<method name="get_navigation_map" qualifiers="const">
<return type="RID" />
<description>
Returns the [RID] of the [NavigationServer2D] navigation used by this [TileMapLayer].
Returns the [RID] of the [NavigationServer2D] navigation used by this [TileMapLayer].
By default this returns the default [World2D] navigation map, unless a custom map was provided using [method set_navigation_map].
</description>
</method>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/Time.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<method name="get_time_zone_from_system" qualifiers="const">
<return type="Dictionary" />
<description>
Returns the current time zone as a dictionary of keys: [code]bias[/code] and [code]name[/code].
Returns the current time zone as a dictionary of keys: [code]bias[/code] and [code]name[/code].
- [code]bias[/code] is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC.
- [code]name[/code] is the localized name of the time zone, according to the OS locale settings of the current user.
</description>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/VisualShaderNodeFrame.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A frame other visual shader nodes can be attached to for better organization.
</brief_description>
<description>
A rectangular frame that can be used to group visual shader nodes together to improve organization.
A rectangular frame that can be used to group visual shader nodes together to improve organization.
Nodes attached to the frame will move with it when it is dragged and it can automatically resize to enclose all attached nodes.
Its title, description and color can be customized.
</description>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gles3/shaders/effects/post.glsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* clang-format off */
#[modes]
mode_default =
mode_default =

#[specializations]

Expand Down
2 changes: 1 addition & 1 deletion gles3_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def build_gles3_header(
fd.write("\t}\n\n")

fd.write("};\n\n")
fd.write("#endif\n\n")
fd.write("#endif\n")


def build_gles3_headers(target, source, env):
Expand Down
1 change: 0 additions & 1 deletion misc/dist/ios_xcode/godot_ios/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/* Localized versions of Info.plist keys */

1 change: 0 additions & 1 deletion misc/error_suppressions/tsan.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ deadlock:tests/core/templates/test_command_queue.h
deadlock:modules/text_server_adv/text_server_adv.cpp
deadlock:modules/text_server_fb/text_server_fb.cpp
race:modules/navigation/nav_map.cpp

4 changes: 2 additions & 2 deletions misc/extension_api_validation/4.2-stable.expected
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ GH-86978
--------
Validate extension JSON: Error: Field 'classes/TextEdit/methods/set_selection_mode/arguments': size changed value in new API, from 4 to 1.

Removed optional arguments set_selection_mode, use set_selection_origin_line/column instead.
Removed optional arguments set_selection_mode, use set_selection_origin_line/column instead.
Compatibility methods registered.


Expand All @@ -343,4 +343,4 @@ GH-91143
--------
Validate extension JSON: Error: Field 'classes/Input/methods/vibrate_handheld/arguments': size changed value in new API, from 1 to 2.

Added optional argument. Compatibility method registered.
Added optional argument. Compatibility method registered.
2 changes: 1 addition & 1 deletion modules/enet/doc_classes/ENetConnection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
<param index="1" name="destination_port" type="int" />
<param index="2" name="packet" type="PackedByteArray" />
<description>
Sends a [param packet] toward a destination from the address and port currently bound by this ENetConnection instance.
Sends a [param packet] toward a destination from the address and port currently bound by this ENetConnection instance.
This is useful as it serves to establish entries in NAT routing tables on all devices between this bound instance and the public facing internet, allowing a prospective client's connection packets to be routed backward through the NAT device(s) between the public internet and this host.
This requires forward knowledge of a prospective client's address and communication port as seen by the public internet - after any NAT devices have handled their connection request. This information can be obtained by a [url=https://en.wikipedia.org/wiki/STUN]STUN[/url] service, and must be handed off to your host by an entity that is not the prospective client. This will never work for a client behind a Symmetric NAT due to the nature of the Symmetric NAT routing algorithm, as their IP and Port cannot be known beforehand.
</description>
Expand Down
2 changes: 1 addition & 1 deletion modules/gdscript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ func test():
var a := Foo.A
var b := a as int + 1
print(b)

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ const Constants = preload("gdscript_to_preload.notest.gd")
func test():
var a := Constants.A
print(a)

Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},

; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},

; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},

; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},

; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},

; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},

; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},

; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include=[
{"display": "add_child"},
{"display": "owner"},
{"display": "child_entered_tree"},

; AnimationPlayer
{"display": "autoplay"},
{"display": "play"},
Expand Down
4 changes: 2 additions & 2 deletions modules/gdscript/tests/scripts/lsp/lambdas.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions modules/gdscript/tests/scripts/lsp/local_variables.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func test_member() -> void:
# ^^^^ test -> test
test += 3
#<^^ -> test
member += 5
member += 5
#<^^^^ -> member
test = return_arg(test)
# | ^^^^ -> test
Expand All @@ -22,4 +22,4 @@ func return_arg(arg: int) -> int:
arg += 2
#<^ -> arg
return arg
# ^^^ -> arg
# ^^^ -> arg
2 changes: 1 addition & 1 deletion modules/gdscript/tests/scripts/lsp/properties.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var prop3 := 42:
#<^^^ -> prop3
var prop4: int:
# ^^^^^ prop4 -> prop4
get:
get:
return 42
var prop5 := 42:
# ^^^^^ prop5 -> prop5
Expand Down
10 changes: 5 additions & 5 deletions modules/gdscript/tests/scripts/lsp/scopes.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ func test():
bar([3])
bar([4])
bar([5])

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ func test():

# Validated native static call without return value.
Node.print_orphan_nodes()

Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<GodotTargetPlatform Condition=" '$(GodotTargetPlatform)' == '' and $(RuntimeIdentifier.StartsWith('osx')) ">macos</GodotTargetPlatform>
<GodotTargetPlatform Condition=" '$(GodotTargetPlatform)' == '' and $(RuntimeIdentifier.StartsWith('win')) ">windows</GodotTargetPlatform>
</PropertyGroup>

<!-- Auto-detect the target Godot platform if it was not specified and there's no runtime identifier information. -->
<PropertyGroup Condition=" '$(GodotTargetPlatform)' == '' ">
<GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(Linux))' ">linuxbsd</GodotTargetPlatform>
Expand Down
Loading
Loading