bevy/crates
JoJoJet 3ead10a3e0
Suppress the clippy::type_complexity lint (#8313)
# Objective

The clippy lint `type_complexity` is known not to play well with bevy.
It frequently triggers when writing complex queries, and taking the
lint's advice of using a type alias almost always just obfuscates the
code with no benefit. Because of this, this lint is currently ignored in
CI, but unfortunately it still shows up when viewing bevy code in an
IDE.

As someone who's made a fair amount of pull requests to this repo, I
will say that this issue has been a consistent thorn in my side. Since
bevy code is filled with spurious, ignorable warnings, it can be very
difficult to spot the *real* warnings that must be fixed -- most of the
time I just ignore all warnings, only to later find out that one of them
was real after I'm done when CI runs.

## Solution

Suppress this lint in all bevy crates. This was previously attempted in
#7050, but the review process ended up making it more complicated than
it needs to be and landed on a subpar solution.

The discussion in https://github.com/rust-lang/rust-clippy/pull/10571
explores some better long-term solutions to this problem. Since there is
no timeline on when these solutions may land, we should resolve this
issue in the meantime by locally suppressing these lints.

### Unresolved issues

Currently, these lints are not suppressed in our examples, since that
would require suppressing the lint in every single source file. They are
still ignored in CI.
2023-04-06 21:27:36 +00:00
..
bevy_a11y Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_animation Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_app Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_asset Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_audio Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_core Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_core_pipeline Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_derive Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_diagnostic Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_dylib Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_dynamic_plugin Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_ecs Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_ecs_compile_fail_tests Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_encase_derive Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_gilrs Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_gizmos Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_gltf Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_hierarchy Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_input Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_internal Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_log Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_macro_utils Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_math Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_mikktspace Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_pbr Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_ptr Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_reflect Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_reflect_compile_fail_tests bevy_reflect: Fix trailing comma breaking derives (#8014) 2023-03-27 21:47:33 +00:00
bevy_render Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_scene Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_sprite Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_tasks Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_text Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_time Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_transform Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_ui Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_utils Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_window Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_winit Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00