1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

CI: Bump various pre-commit hooks

This commit is contained in:
Thaddeus Crews
2025-03-29 12:56:52 -05:00
parent a210fe6dbd
commit 5edb235018
13 changed files with 81 additions and 89 deletions

View File

@@ -11,7 +11,7 @@ exclude: |
repos: repos:
- repo: https://github.com/pre-commit/mirrors-clang-format - repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.3 rev: v20.1.0
hooks: hooks:
- id: clang-format - id: clang-format
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$ files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
@@ -29,12 +29,12 @@ repos:
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$ files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
args: [--fix, --quiet, --use-color] args: [--fix, --quiet, --use-color]
types_or: [text] types_or: [text]
additional_dependencies: [clang-tidy==19.1.0] additional_dependencies: [clang-tidy==20.1.0]
require_serial: true require_serial: true
stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy` stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy`
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.10 rev: v0.11.4
hooks: hooks:
- id: ruff - id: ruff
args: [--fix] args: [--fix]
@@ -52,7 +52,7 @@ repos:
types_or: [text] types_or: [text]
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
rev: v2.3.0 rev: v2.4.1
hooks: hooks:
- id: codespell - id: codespell
additional_dependencies: [tomli] additional_dependencies: [tomli]

View File

@@ -81,8 +81,7 @@ class CallableCustomMethodPointer : public CallableCustomMethodPointerBase {
struct Data { struct Data {
T *instance; T *instance;
uint64_t object_id; uint64_t object_id;
R(T::*method) R (T::*method)(P...);
(P...);
} data; } data;
public: public:
@@ -151,8 +150,7 @@ class CallableCustomMethodPointerC : public CallableCustomMethodPointerBase {
struct Data { struct Data {
T *instance; T *instance;
uint64_t object_id; uint64_t object_id;
R(T::*method) R (T::*method)(P...) const;
(P...) const;
} data; } data;
public: public:
@@ -225,8 +223,7 @@ Callable create_custom_callable_function_pointer(T *p_instance,
template <typename R, typename... P> template <typename R, typename... P>
class CallableCustomStaticMethodPointer : public CallableCustomMethodPointerBase { class CallableCustomStaticMethodPointer : public CallableCustomMethodPointerBase {
struct Data { struct Data {
R(*method) R (*method)(P...);
(P...);
} data; } data;
public: public:

View File

@@ -142,8 +142,7 @@ public:
template <typename Derived, typename T, typename R, bool should_returns> template <typename Derived, typename T, typename R, bool should_returns>
class MethodBindVarArgBase : public MethodBind { class MethodBindVarArgBase : public MethodBind {
protected: protected:
R(T::*method) R (T::*method)(const Variant **, int, Callable::CallError &);
(const Variant **, int, Callable::CallError &);
MethodInfo method_info; MethodInfo method_info;
public: public:
@@ -473,8 +472,7 @@ template <typename T, typename R, typename... P>
template <typename R, typename... P> template <typename R, typename... P>
#endif #endif
class MethodBindTR : public MethodBind { class MethodBindTR : public MethodBind {
R(MB_T::*method) R (MB_T::*method)(P...);
(P...);
protected: protected:
virtual Variant::Type _gen_argument_type(int p_arg) const override { virtual Variant::Type _gen_argument_type(int p_arg) const override {
@@ -569,8 +567,7 @@ template <typename T, typename R, typename... P>
template <typename R, typename... P> template <typename R, typename... P>
#endif #endif
class MethodBindTRC : public MethodBind { class MethodBindTRC : public MethodBind {
R(MB_T::*method) R (MB_T::*method)(P...) const;
(P...) const;
protected: protected:
virtual Variant::Type _gen_argument_type(int p_arg) const override { virtual Variant::Type _gen_argument_type(int p_arg) const override {
@@ -721,8 +718,7 @@ MethodBind *create_static_method_bind(void (*p_method)(P...)) {
template <typename R, typename... P> template <typename R, typename... P>
class MethodBindTRS : public MethodBind { class MethodBindTRS : public MethodBind {
R(*function) R (*function)(P...);
(P...);
protected: protected:
virtual Variant::Type _gen_argument_type(int p_arg) const override { virtual Variant::Type _gen_argument_type(int p_arg) const override {

View File

@@ -47,8 +47,7 @@ public:
std::is_same<T, char>, std::is_same<T, char>,
std::is_same<T, char16_t>, std::is_same<T, char16_t>,
std::is_same<T, char32_t>, std::is_same<T, char32_t>,
std::is_same<T, wchar_t> std::is_same<T, wchar_t>>;
>;
_FORCE_INLINE_ constexpr Span() = default; _FORCE_INLINE_ constexpr Span() = default;
_FORCE_INLINE_ constexpr Span(const T *p_ptr, uint64_t p_len) : _FORCE_INLINE_ constexpr Span(const T *p_ptr, uint64_t p_len) :

View File

@@ -195,9 +195,9 @@ void SSAO_tap_inner(const int p_quality_level, inout float r_obscurance_sum, ino
float weight = 1.0; float weight = 1.0;
if (p_quality_level >= SSAO_HALOING_REDUCTION_ENABLE_AT_QUALITY_PRESET) { if (p_quality_level >= SSAO_HALOING_REDUCTION_ENABLE_AT_QUALITY_PRESET) {
float reduct = max(0, -hit_delta.z); float reduce = max(0, -hit_delta.z);
reduct = clamp(reduct * params.neg_inv_radius + 2.0, 0.0, 1.0); reduce = clamp(reduce * params.neg_inv_radius + 2.0, 0.0, 1.0);
weight = SSAO_HALOING_REDUCTION_AMOUNT * reduct + (1.0 - SSAO_HALOING_REDUCTION_AMOUNT); weight = SSAO_HALOING_REDUCTION_AMOUNT * reduce + (1.0 - SSAO_HALOING_REDUCTION_AMOUNT);
} }
weight *= p_weight_mod; weight *= p_weight_mod;
r_obscurance_sum += obscurance * weight; r_obscurance_sum += obscurance * weight;

View File

@@ -195,9 +195,9 @@ void SSIL_tap_inner(const int p_quality_level, inout vec3 r_color_sum, inout flo
float weight = 1.0; float weight = 1.0;
if (p_quality_level >= SSIL_HALOING_REDUCTION_ENABLE_AT_QUALITY_PRESET) { if (p_quality_level >= SSIL_HALOING_REDUCTION_ENABLE_AT_QUALITY_PRESET) {
float reduct = max(0, -hit_delta.z); float reduce = max(0, -hit_delta.z);
reduct = clamp(reduct * params.neg_inv_radius + 2.0, 0.0, 1.0); reduce = clamp(reduce * params.neg_inv_radius + 2.0, 0.0, 1.0);
weight = SSIL_HALOING_REDUCTION_AMOUNT * reduct + (1.0 - SSIL_HALOING_REDUCTION_AMOUNT); weight = SSIL_HALOING_REDUCTION_AMOUNT * reduce + (1.0 - SSIL_HALOING_REDUCTION_AMOUNT);
} }
// Translate sampling_uv to last screen's coordinates // Translate sampling_uv to last screen's coordinates