Skip to content

WIP reflection data stuff #403

WIP reflection data stuff

WIP reflection data stuff #403

GitHub Actions / clippy failed Nov 4, 2024 in 2s

clippy

157 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 157
Warning 0
Note 0
Help 0

Versions

  • rustc 1.84.0-nightly (b8c8287a2 2024-11-03)
  • cargo 1.84.0-nightly (031049782 2024-11-01)
  • clippy 0.1.84 (b8c8287a22 2024-11-03)

Annotations

Check failure on line 552 in hook/src/hooks/dap.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

creating a mutable reference to mutable static is discouraged

error: creating a mutable reference to mutable static is discouraged
   --> hook/src/hooks/dap.rs:551:24
    |
551 |               let path = NAME_CACHE
    |  ________________________^
552 | |                 .as_mut()
    | |_________________________^ mutable reference to mutable static
    |
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
    = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives

Check failure on line 539 in hook/src/hooks/dap.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

creating a shared reference to mutable static is discouraged

error: creating a shared reference to mutable static is discouraged
   --> hook/src/hooks/dap.rs:539:12
    |
539 |         if NAME_CACHE.is_none() {
    |            ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
    |
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
    = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
    = note: `-D static-mut-refs` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(static_mut_refs)]`

Check failure on line 65 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `Offset` should have a snake case name

error: structure field `Offset` should have a snake case name
  --> hook/src/hooks/mod.rs:65:5
   |
65 |     Offset: i32, // TODO actually UE4CodeGen_Private::FGenericPropertyParams
   |     ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `offset`

Check failure on line 63 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `ArrayDim` should have a snake case name

error: structure field `ArrayDim` should have a snake case name
  --> hook/src/hooks/mod.rs:63:24
   |
63 |     /* offset 0x020 */ ArrayDim: i32,
   |                        ^^^^^^^^ help: convert the identifier to snake case: `array_dim`

Check failure on line 62 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `ObjectFlags` should have a snake case name

error: structure field `ObjectFlags` should have a snake case name
  --> hook/src/hooks/mod.rs:62:24
   |
62 |     /* offset 0x01c */ ObjectFlags: ue::EObjectFlags,
   |                        ^^^^^^^^^^^ help: convert the identifier to snake case: `object_flags`

Check failure on line 61 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `Flags` should have a snake case name

error: structure field `Flags` should have a snake case name
  --> hook/src/hooks/mod.rs:61:24
   |
61 |     /* offset 0x018 */ Flags: UE4CodeGen_Private_EPropertyGenFlags,
   |                        ^^^^^ help: convert the identifier to snake case (notice the capitalization): `flags`

Check failure on line 60 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `PropertyFlags` should have a snake case name

error: structure field `PropertyFlags` should have a snake case name
  --> hook/src/hooks/mod.rs:60:24
   |
60 |     /* offset 0x010 */ PropertyFlags: ue::EPropertyFlags,
   |                        ^^^^^^^^^^^^^ help: convert the identifier to snake case: `property_flags`

Check failure on line 59 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `RepNotifyFuncUTF8` should have a snake case name

error: structure field `RepNotifyFuncUTF8` should have a snake case name
  --> hook/src/hooks/mod.rs:59:24
   |
59 |     /* offset 0x008 */ RepNotifyFuncUTF8: *const char,
   |                        ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `rep_notify_func_utf8`

Check failure on line 58 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `NameUTF8` should have a snake case name

error: structure field `NameUTF8` should have a snake case name
  --> hook/src/hooks/mod.rs:58:24
   |
58 |     /* offset 0x000 */ NameUTF8: *const char,
   |                        ^^^^^^^^ help: convert the identifier to snake case: `name_utf8`

Check failure on line 52 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `ClassFlags` should have a snake case name

error: structure field `ClassFlags` should have a snake case name
  --> hook/src/hooks/mod.rs:52:24
   |
52 |     /* offset 0x048 */ ClassFlags: u32,
   |                        ^^^^^^^^^^ help: convert the identifier to snake case: `class_flags`

Check failure on line 51 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `NumImplementedInterfaces` should have a snake case name

error: structure field `NumImplementedInterfaces` should have a snake case name
  --> hook/src/hooks/mod.rs:51:24
   |
51 |     /* offset 0x044 */ NumImplementedInterfaces: i32,
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `num_implemented_interfaces`

Check failure on line 50 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `NumProperties` should have a snake case name

error: structure field `NumProperties` should have a snake case name
  --> hook/src/hooks/mod.rs:50:24
   |
50 |     /* offset 0x040 */ NumProperties: i32,
   |                        ^^^^^^^^^^^^^ help: convert the identifier to snake case: `num_properties`

Check failure on line 49 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `NumFunctions` should have a snake case name

error: structure field `NumFunctions` should have a snake case name
  --> hook/src/hooks/mod.rs:49:24
   |
49 |     /* offset 0x03c */ NumFunctions: i32,
   |                        ^^^^^^^^^^^^ help: convert the identifier to snake case: `num_functions`

Check failure on line 48 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `NumDependencySingletons` should have a snake case name

error: structure field `NumDependencySingletons` should have a snake case name
  --> hook/src/hooks/mod.rs:48:24
   |
48 |     /* offset 0x038 */ NumDependencySingletons: i32,
   |                        ^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `num_dependency_singletons`

Check failure on line 47 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `ImplementedInterfaceArray` should have a snake case name

error: structure field `ImplementedInterfaceArray` should have a snake case name
  --> hook/src/hooks/mod.rs:47:24
   |
47 |     /* offset 0x030 */ ImplementedInterfaceArray: *const (),
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `implemented_interface_array`

Check failure on line 46 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `PropertyArray` should have a snake case name

error: structure field `PropertyArray` should have a snake case name
  --> hook/src/hooks/mod.rs:46:5
   |
46 |     PropertyArray: *const *const UE4CodeGen_Private_FPropertyParamsBase,
   |     ^^^^^^^^^^^^^ help: convert the identifier to snake case: `property_array`

Check failure on line 44 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `FunctionLinkArray` should have a snake case name

error: structure field `FunctionLinkArray` should have a snake case name
  --> hook/src/hooks/mod.rs:44:24
   |
44 |     /* offset 0x020 */ FunctionLinkArray: *const (),
   |                        ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `function_link_array`

Check failure on line 43 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `DependencySingletonFuncArray` should have a snake case name

error: structure field `DependencySingletonFuncArray` should have a snake case name
  --> hook/src/hooks/mod.rs:43:24
   |
43 |     /* offset 0x018 */ DependencySingletonFuncArray: *const (),
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `dependency_singleton_func_array`

Check failure on line 42 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `CppClassInfo` should have a snake case name

error: structure field `CppClassInfo` should have a snake case name
  --> hook/src/hooks/mod.rs:42:24
   |
42 |     /* offset 0x010 */ CppClassInfo: *const (),
   |                        ^^^^^^^^^^^^ help: convert the identifier to snake case: `cpp_class_info`

Check failure on line 41 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `ClassConfigNameUTF8` should have a snake case name

error: structure field `ClassConfigNameUTF8` should have a snake case name
  --> hook/src/hooks/mod.rs:41:24
   |
41 |     /* offset 0x008 */ ClassConfigNameUTF8: *const (),
   |                        ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `class_config_name_utf8`

Check failure on line 40 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

structure field `ClassNoRegisterFunc` should have a snake case name

error: structure field `ClassNoRegisterFunc` should have a snake case name
  --> hook/src/hooks/mod.rs:40:5
   |
40 |     ClassNoRegisterFunc: unsafe extern "system" fn() -> *const ue::UClass,
   |     ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `class_no_register_func`
   |
   = note: `-D non-snake-case` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(non_snake_case)]`

Check failure on line 462 in hook/src/ue/object.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting raw pointers to the same type and constness is unnecessary (`*const ue::object::FField` -> `*const ue::object::FField`)

error: casting raw pointers to the same type and constness is unnecessary (`*const ue::object::FField` -> `*const ue::object::FField`)
   --> hook/src/ue/object.rs:462:43
    |
462 |             let mut next_field = unsafe { (ustruct.child_properties as *const FField).as_ref() };
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ustruct.child_properties`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check failure on line 227 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression borrows a value the compiler would automatically borrow

error: this expression borrows a value the compiler would automatically borrow
   --> hook/src/hooks/mod.rs:227:40
    |
227 |                 for (struct_, prop) in (&**class).ustruct.properties() {
    |                                        ^^^^^^^^^^ help: change this to: `(**class)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 214 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

error: redundant closure
   --> hook/src/hooks/mod.rs:214:53
    |
214 |                 new_props.extend(ex_prop.iter().map(|p| std::ptr::from_ref(p)));
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `std::ptr::from_ref`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
    = note: `-D clippy::redundant-closure` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`

Check failure on line 198 in hook/src/hooks/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manually constructing a nul-terminated string

error: manually constructing a nul-terminated string
   --> hook/src/hooks/mod.rs:198:35
    |
198 |                         NameUTF8: "InjectedReflectionProp2\0".as_ptr() as *const char,
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"InjectedReflectionProp2"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals