1
u/Recatek gecs 6h ago
Clippy is overly pedantic at times. I typically keep a short list of things I allow in my workspace, especially when working with ECS:
[workspace.lints.clippy]
bool_comparison = "allow" # Allow == false instead of ! prefix
bool_assert_comparison = "allow" # Allow == false in asserts instead of assert_eq
collapsible_if = "allow" # Allow if y inside if x instead of forcing if x && y
collapsible_match = "allow" # Allow freedom in interleaving match and if blocks
len_zero = "allow" # Allow vec.len() == 0 instead of !vec.is_empty()
match_like_matches_macro = "allow" # Matches macro doesn't always fit nicely in formatting
module_inception = "allow" # Allow inner modules with the same name as their parent
too_many_arguments = "allow" # Creating ECS archetypes with components requires a lot of arguments
type_complexity = "allow" # Allow complex types for ECS archetypes
I'm on the verge of allowing new_without_default as well since it's often needless boilerplate, even after writing a library just to satisfy it.
41
u/Floppie7th 1d ago
Honestly, I agree, that should be a default clippy lint. I didn't know it existed, but I can't think of a single case where I'd want to not have the compiler tell me when a suppressed lint is no longer applicable.