Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

CI: Bump clang-format and clang-tidy hooks

Thaddeus Crews8adef7c3a020
diff --git a/.github/actions/clangd-tidy/action.yml b/.github/actions/clangd-tidy/action.yml
index 502c75cc406..bede1bcc386 100644
--- a/.github/actions/clangd-tidy/action.yml
+++ b/.github/actions/clangd-tidy/action.yml
@@ -22,7 +22,7 @@ runs:
echo "::group::Installing clangd-tidy"
# Don't know which python we're using, so just access the global scope.
- python -m pip install clangd clangd-tidy clang-tidy==22.1.7
+ python -m pip install clangd clangd-tidy clang-tidy==23.1.4
echo "::endgroup::"
echo "::group::Running clangd-tidy"
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 2d6b80a7b3a..cfa2eca3787 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -17,7 +17,7 @@ repos:
exclude: (SConstruct|SCsub)$ # SCons files use shebangs for syntax highlighting only.
- repo: https://github.com/pre-commit/mirrors-clang-format
- rev: v22.1.5
+ rev: v23.1.5
hooks:
- id: clang-format
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
@@ -48,7 +48,7 @@ repos:
# TODO: `inc` ignored for now, because they don't include their parent header.
"--allow-extensions=c,h,cpp,hpp,cc,hh,cxx,hxx,m,mm",
]
- additional_dependencies: [clangd, clang-tidy==22.1.7]
+ additional_dependencies: [clangd, clang-tidy==23.1.4]
stages: [manual]
- repo: https://github.com/astral-sh/ruff-pre-commit
diff --git a/core/math/projection.cpp b/core/math/projection.cpp
index bc4b4cb8e93..8f68d3bf6e1 100644
--- a/core/math/projection.cpp
+++ b/core/math/projection.cpp
@@ -355,7 +355,7 @@ Projection Projection::flipped_y() const {
return proj;
}
-Projection Projection ::jitter_offseted(const Vector2 &p_offset) const {
+Projection Projection::jitter_offseted(const Vector2 &p_offset) const {
Projection proj = *this;
proj.add_jitter_offset(p_offset);
return proj;
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index a850c23c5bd..02dec0be1c2 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -1772,7 +1772,7 @@ StringName Variant::get_enum_for_enumeration(Variant::Type p_type, const StringN
register_builtin_method<Method_##m_type##_##m_method>(m_arg_names, m_default_args);
#else
#define bind_method(m_type, m_method, m_arg_names, m_default_args) \
- METHOD_CLASS(m_type, m_method, m_method, &m_type ::m_method); \
+ METHOD_CLASS(m_type, m_method, m_method, &m_type::m_method); \
register_builtin_method<Method_##m_type##_##m_method>(sarray(), m_default_args);
#endif // DEBUG_ENABLED
@@ -1782,7 +1782,7 @@ StringName Variant::get_enum_for_enumeration(Variant::Type p_type, const StringN
register_builtin_compat_method<Method_##m_type##_##m_method>(m_arg_names, m_default_args);
#else
#define bind_compat_method(m_type, m_exposed_method, m_method, m_arg_names, m_default_args) \
- METHOD_CLASS(m_type, m_exposed_method, m_method, &m_type ::m_method); \
+ METHOD_CLASS(m_type, m_exposed_method, m_method, &m_type::m_method); \
register_builtin_compat_method<Method_##m_type##_##m_method>(sarray(), m_default_args);
#endif // DEBUG_ENABLED
@@ -1792,7 +1792,7 @@ StringName Variant::get_enum_for_enumeration(Variant::Type p_type, const StringN
register_builtin_method<Method_##m_type_from##_##m_method>(m_arg_names, m_default_args);
#else
#define bind_convert_method(m_type_from, m_type_to, m_method, m_arg_names, m_default_args) \
- CONVERT_METHOD_CLASS(m_type_from, m_method, m_method, &m_type_to ::m_method); \
+ CONVERT_METHOD_CLASS(m_type_from, m_method, m_method, &m_type_to::m_method); \
register_builtin_method<Method_##m_type_from##_##m_method>(sarray(), m_default_args);
#endif // DEBUG_ENABLED
@@ -1802,7 +1802,7 @@ StringName Variant::get_enum_for_enumeration(Variant::Type p_type, const StringN
register_builtin_compat_method<Method_##m_type_from##_##m_method>(m_arg_names, m_default_args);
#else
#define bind_convert_compat_method(m_type_from, m_type_to, m_exposed_method, m_method, m_arg_names, m_default_args) \
- CONVERT_METHOD_CLASS(m_type_from, m_exposed_method, m_method, &m_type_to ::m_method); \
+ CONVERT_METHOD_CLASS(m_type_from, m_exposed_method, m_method, &m_type_to::m_method); \
register_builtin_compat_method<Method_##m_type_from##_##m_method>(sarray(), m_default_args);
#endif // DEBUG_ENABLED
@@ -1812,7 +1812,7 @@ StringName Variant::get_enum_for_enumeration(Variant::Type p_type, const StringN
register_builtin_method<Method_##m_type##_##m_method>(m_arg_names, m_default_args);
#else
#define bind_static_method(m_type, m_method, m_arg_names, m_default_args) \
- STATIC_METHOD_CLASS(m_type, m_method, m_method, m_type ::m_method); \
+ STATIC_METHOD_CLASS(m_type, m_method, m_method, m_type::m_method); \
register_builtin_method<Method_##m_type##_##m_method>(sarray(), m_default_args);
#endif // DEBUG_ENABLED
@@ -1822,7 +1822,7 @@ StringName Variant::get_enum_for_enumeration(Variant::Type p_type, const StringN
register_builtin_compat_method<Method_##m_type##_##m_method>(m_arg_names, m_default_args);
#else
#define bind_static_compat_method(m_type, m_exposed_method, m_method, m_arg_names, m_default_args) \
- STATIC_METHOD_CLASS(m_type, m_exposed_method, m_method, m_type ::m_method); \
+ STATIC_METHOD_CLASS(m_type, m_exposed_method, m_method, m_type::m_method); \
register_builtin_compat_method<Method_##m_type##_##m_method>(sarray(), m_default_args);
#endif // DEBUG_ENABLED
diff --git a/editor/gui/editor_spin_slider.cpp b/editor/gui/editor_spin_slider.cpp
index bc6b781965f..ba38a73db43 100644
--- a/editor/gui/editor_spin_slider.cpp
+++ b/editor/gui/editor_spin_slider.cpp
@@ -729,7 +729,7 @@ void EditorSpinSlider::_focus_entered(bool p_hide_focus) {
value_input->set_focus_previous(find_prev_valid_focus()->get_path());
callable_mp((CanvasItem *)value_input, &CanvasItem::show).call_deferred();
callable_mp((Control *)value_input, &Control::grab_focus).call_deferred(p_hide_focus);
- callable_mp(value_input, &LineEdit ::select_all).call_deferred();
+ callable_mp(value_input, &LineEdit::select_all).call_deferred();
emit_signal("value_focus_entered");
}
diff --git a/editor/shader/shader_baker/shader_baker_export_plugin_platform_d3d12.cpp b/editor/shader/shader_baker/shader_baker_export_plugin_platform_d3d12.cpp
index bd00d45913d..af1b6c1fa09 100644
--- a/editor/shader/shader_baker/shader_baker_export_plugin_platform_d3d12.cpp
+++ b/editor/shader/shader_baker/shader_baker_export_plugin_platform_d3d12.cpp
@@ -50,7 +50,7 @@ bool ShaderBakerExportPluginPlatformD3D12::matches_driver(const String &p_driver
return p_driver == "d3d12";
}
-ShaderBakerExportPluginPlatformD3D12 ::~ShaderBakerExportPluginPlatformD3D12() {
+ShaderBakerExportPluginPlatformD3D12::~ShaderBakerExportPluginPlatformD3D12() {
if (lib_d3d12 != nullptr) {
FreeLibrary((HMODULE)(lib_d3d12));
}
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index bac67089ca4..12c75ecc6b9 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -5901,7 +5901,7 @@ void Viewport::CameraOverride<T>::enable(Viewport *p_viewport, const T *p_curren
}
T *override_camera = memnew(T);
- override_camera->set_name(vformat("Override%s", T ::get_class_static()));
+ override_camera->set_name(vformat("Override%s", T::get_class_static()));
p_viewport->add_child(override_camera, false, Node::INTERNAL_MODE_BACK);
override_camera->make_current();