- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.2k
          bevy_gltf: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
          #17280
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
  
    bevy_gltf: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
  
  #17280
              Conversation
…hout_reason)]` to bevy_gltf
| )] | ||
| #[allow( | ||
| unused_variables, | ||
| reason = "Depending on what features are used to compile this crate, certain parameters may end up unused." | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add feature gates to parameters. This is a usability improvement for callers using those feature combinations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClearcoatExtension (the struct this lint is in) is not a public struct, and this method is only called in one place; thus, there wouldn't be much of a point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im general, if the values at the call-sites aren't needed, it means that the caller can do less work to prepare arguments for the function. See how we festure gate render and text within bevy-ui. I'll approve this since it doesn't need to be addressed in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Yeah, even if we wanted to feature-gate it, I feel like that'd be work for a different PR.
| )] | ||
| #[allow( | ||
| unused_variables, | ||
| reason = "Depending on what features are used to compile this crate, certain parameters may end up unused." | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add feature gates to parameters. This would be a usability improvement for callers using those feature combinations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AnisotropyExtension (the struct this lint is in) is not a public struct, and this method is only called in one place; thus, there wouldn't be much of a point.
… of allowing it to be dead code
…ributes_without_reason)]` (bevyengine#17280) # Objective - bevyengine#17111 ## Solution Set the `clippy::allow_attributes` and `clippy::allow_attributes_without_reason` lints to `deny`, and bring `bevy_gltf` in line with the new restrictions. ## Testing `cargo clippy --tests --all-features --package bevy_gltf` was run, and no errors were encountered.
Objective
clippy::allow_attributesandclippy::allow_attributes_without_reasonlints #17111Solution
Set the
clippy::allow_attributesandclippy::allow_attributes_without_reasonlints todeny, and bringbevy_gltfin line with the new restrictions.Testing
cargo clippy --tests --all-features --package bevy_gltfwas run, and no errors were encountered.