From c8169ea274049c486aa232aa1c509c3ad657149a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 25 Apr 2025 15:30:29 +0200 Subject: [PATCH] Style: Apply fixes from codespell --- core/extension/gdextension_interface.h | 12 ++++++------ doc/classes/BaseMaterial3D.xml | 2 +- doc/classes/Curve.xml | 2 +- doc/classes/Node3D.xml | 2 +- doc/classes/Tween.xml | 2 +- misc/scripts/codespell.sh | 2 +- modules/gdscript/gdscript_byte_codegen.cpp | 2 +- platform/linuxbsd/x11/display_server_x11.cpp | 2 +- scene/2d/line_builder.cpp | 2 +- scene/3d/vehicle_body_3d.cpp | 2 +- servers/audio/effects/audio_effect_record.cpp | 2 +- servers/physics_3d/godot_space_3d.cpp | 2 +- servers/physics_3d/joints/godot_pin_joint_3d.cpp | 2 +- .../forward_mobile/render_forward_mobile.cpp | 4 ++-- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index 4d7bdf95023..94a9179ad20 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -543,7 +543,7 @@ typedef void (*GDExtensionInterfaceMemFree)(void *p_ptr); * * Logs an error to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. * @param p_line The line where the error occurred. @@ -557,7 +557,7 @@ typedef void (*GDExtensionInterfacePrintError)(const char *p_description, const * * Logs an error with a message to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_message The message to show along with the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. @@ -572,7 +572,7 @@ typedef void (*GDExtensionInterfacePrintErrorWithMessage)(const char *p_descript * * Logs a warning to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the warning. + * @param p_description The code triggering the warning. * @param p_function The function name where the warning occurred. * @param p_file The file where the warning occurred. * @param p_line The line where the warning occurred. @@ -586,7 +586,7 @@ typedef void (*GDExtensionInterfacePrintWarning)(const char *p_description, cons * * Logs a warning with a message to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the warning. + * @param p_description The code triggering the warning. * @param p_message The message to show along with the warning. * @param p_function The function name where the warning occurred. * @param p_file The file where the warning occurred. @@ -601,7 +601,7 @@ typedef void (*GDExtensionInterfacePrintWarningWithMessage)(const char *p_descri * * Logs a script error to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. * @param p_line The line where the error occurred. @@ -615,7 +615,7 @@ typedef void (*GDExtensionInterfacePrintScriptError)(const char *p_description, * * Logs a script error with a message to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_message The message to show along with the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 7ea13301b2f..35a5f89d10f 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -88,7 +88,7 @@ The strength of the anisotropy effect. This is multiplied by [member anisotropy_flowmap]'s alpha channel if a texture is defined there and the texture contains an alpha channel. - If [code]true[/code], anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections. + If [code]true[/code], anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminum and hair reflections. [b]Note:[/b] Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken. [b]Note:[/b] Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting [member texture_filter] to [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC]. diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index 52f79ecc9dc..07760e1c4b9 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -4,7 +4,7 @@ A mathematic curve. - A curve that can be saved and re-used for other objects. By default, it ranges between [code]0[/code] and [code]1[/code] on the Y axis and positions points relative to the [code]0.5[/code] Y position. + A curve that can be saved and reused for other objects. By default, it ranges between [code]0[/code] and [code]1[/code] on the Y axis and positions points relative to the [code]0.5[/code] Y position. See also [Gradient] which is designed for color interpolation. See also [Curve2D] and [Curve3D]. diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 6cb84a8b49d..e4dad0a0fdb 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -292,7 +292,7 @@ Access to the node rotation as a [Quaternion]. This property is ideal for tweening complex rotations. - Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotaton in the order specified by the [member rotation_order] property. + Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotation in the order specified by the [member rotation_order] property. [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. [b]Note:[/b] This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees]. diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index e7bc434a0ea..01a24e9d2dc 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -89,7 +89,7 @@ [/codeblocks] Some [Tweener]s use transitions and eases. The first accepts a [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best. [url=https://raw.githubusercontent.com/godotengine/godot-docs/4.1/img/tween_cheatsheet.webp]Tween easing and transition types cheatsheet[/url] - [b]Note:[/b] Tweens are not designed to be re-used and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating. + [b]Note:[/b] Tweens are not designed to be reused and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating. [b]Note:[/b] The tween is processed after all of the nodes in the current frame, i.e. node's [method Node._process] method would be called before the timer (or [method Node._physics_process] depending on the value passed to [method set_process_mode]). diff --git a/misc/scripts/codespell.sh b/misc/scripts/codespell.sh index be6087172c1..4c97c9a4e05 100755 --- a/misc/scripts/codespell.sh +++ b/misc/scripts/codespell.sh @@ -3,6 +3,6 @@ SKIP_LIST="./.*,./**/.*,./bin,./thirdparty,*.desktop,*.gen.*,*.po,*.pot,*.rc,./A SKIP_LIST+="./core/input/gamecontrollerdb.txt,./core/string/locales.h,./editor/renames_map_3_to_4.cpp,./misc/scripts/codespell.sh," SKIP_LIST+="./platform/android/java/lib/src/com,./platform/web/node_modules,./platform/web/package-lock.json," -IGNORE_LIST="breaked,checkin,curvelinear,doubleclick,expct,findn,gird,hel,inout,labelin,lod,mis,nd,numer,ot,outin,pointin,requestor,te,textin,thirdparty,vai" +IGNORE_LIST="breaked,checkin,curvelinear,doubleclick,expct,findn,gird,hel,inout,labelin,lod,mis,nd,numer,ot,outin,pointin,reduct,requestor,te,textin,thirdparty,vai" codespell -w -q 3 -S "${SKIP_LIST}" -L "${IGNORE_LIST}" --builtin "clear,rare,en-GB_to_en-US" diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index 47cd3f768b4..1b43f5d2c8d 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -1772,7 +1772,7 @@ void GDScriptByteCodeGenerator::end_block() { void GDScriptByteCodeGenerator::clean_temporaries() { List::Element *E = temporaries_pending_clear.front(); while (E) { - // The temporary may have been re-used as something else than an object + // The temporary may have been reused as something else than an object // since it was added to the list. In that case, there's no need to clear it. int slot_idx = E->get(); const StackSlot &slot = temporaries[slot_idx]; diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index cbdabb6ad71..8bef5a89e55 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -4389,7 +4389,7 @@ void DisplayServerX11::process_events() { XSync(x11_display, False); XGetWindowAttributes(x11_display, wd.x11_window, &xwa); - // Set focus when menu window is re-used. + // Set focus when menu window is reused. // RevertToPointerRoot is used to make sure we don't lose all focus in case // a subwindow and its parent are both destroyed. if ((xwa.map_state == IsViewable) && !wd.no_focus && !wd.is_popup) { diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp index 0970325502b..c9b80ae2573 100644 --- a/scene/2d/line_builder.cpp +++ b/scene/2d/line_builder.cpp @@ -367,7 +367,7 @@ void LineBuilder::build() { } if (intersection_result != SEGMENT_INTERSECT) { - // In this case the joint is too corrupted to be re-used, + // In this case the joint is too corrupted to be reused, // start again the strip with fallback points strip_begin(pos_up0, pos_down0, color1, uvx1); } diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index e23703a6dce..a017df2fb55 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -532,7 +532,7 @@ void VehicleBody3D::_resolve_single_bilateral(PhysicsDirectBodyState3D *s, const if (body2) { rel_pos2 = pos2 - body2->get_global_transform().origin; } - //this jacobian entry could be re-used for all iterations + //this jacobian entry could be reused for all iterations Vector3 vel1 = s->get_linear_velocity() + (s->get_angular_velocity()).cross(rel_pos1); // * mPos); Vector3 vel2; diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp index 6e49bb122b7..47d409ec312 100644 --- a/servers/audio/effects/audio_effect_record.cpp +++ b/servers/audio/effects/audio_effect_record.cpp @@ -125,7 +125,7 @@ Ref AudioEffectRecord::instantiate() { ins.instantiate(); ins->is_recording = false; - //Re-using the buffer size calculations from audio_effect_delay.cpp + //Reusing the buffer size calculations from audio_effect_delay.cpp float ring_buffer_max_size = IO_BUFFER_SIZE_MS; ring_buffer_max_size /= 1000.0; //convert to seconds ring_buffer_max_size *= AudioServer::get_singleton()->get_mix_rate(); diff --git a/servers/physics_3d/godot_space_3d.cpp b/servers/physics_3d/godot_space_3d.cpp index 35f6fa023d2..b5ea32fc126 100644 --- a/servers/physics_3d/godot_space_3d.cpp +++ b/servers/physics_3d/godot_space_3d.cpp @@ -464,7 +464,7 @@ static void _rest_cbk_result(const Vector3 &p_point_A, int p_index_A, const Vect real_t tested_len = is_best_result ? rd->best_result.len : len; for (; result_index < prev_result_count - 1; ++result_index) { if (tested_len > rd->other_results[result_index].len) { - // Re-using a previous result. + // Reusing a previous result. rd->result_count--; break; } diff --git a/servers/physics_3d/joints/godot_pin_joint_3d.cpp b/servers/physics_3d/joints/godot_pin_joint_3d.cpp index 05ae0839e4f..304c05f59d5 100644 --- a/servers/physics_3d/joints/godot_pin_joint_3d.cpp +++ b/servers/physics_3d/joints/godot_pin_joint_3d.cpp @@ -96,7 +96,7 @@ void GodotPinJoint3D::solve(real_t p_step) { Vector3 rel_pos1 = pivotAInW - A->get_transform().origin; Vector3 rel_pos2 = pivotBInW - B->get_transform().origin; - //this jacobian entry could be re-used for all iterations + //this jacobian entry could be reused for all iterations Vector3 vel1 = A->get_velocity_in_local_point(rel_pos1); Vector3 vel2 = B->get_velocity_in_local_point(rel_pos2); diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp index 16f265ae6e2..7c8af95ed8a 100644 --- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp +++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp @@ -200,7 +200,7 @@ RID RenderForwardMobile::RenderBufferDataForwardMobile::get_color_fbs(Framebuffe // Now define our subpasses Vector passes; - // Define our base pass, we'll be re-using this + // Define our base pass, we'll be reusing this RD::FramebufferPass pass; pass.color_attachments.push_back(0); pass.depth_attachment = 1; @@ -307,7 +307,7 @@ RID RenderForwardMobile::reflection_probe_create_framebuffer(RID p_color, RID p_ Vector passes; RD::FramebufferPass pass; - // re-using the same attachments + // reusing the same attachments pass.color_attachments.push_back(0); pass.depth_attachment = 1;