-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
bevy_sprite: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
#17160
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
Closed
LikeLakers2
wants to merge
5
commits into
bevyengine:main
from
LikeLakers2:lint/deny_allow_and_without_reason/bevy_sprite
Closed
bevy_sprite: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
#17160
LikeLakers2
wants to merge
5
commits into
bevyengine:main
from
LikeLakers2:lint/deny_allow_and_without_reason/bevy_sprite
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…hout_reason)]` to bevy_sprite
2 tasks
This PR is blocked on #16338 per Benjamin's request. Once that is merged, I will fix any conflicts and mark it as ready to merge. |
…iables, rather than putting underscores
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 5, 2025
…unused variables, rather than putting underscores on the parameter names (#17171) # Objective While checking over #17160, it occurred to me that rust-analyzer will copy the method signature exactly, when using tab completion trait methods. This includes provided trait methods that use underscores to silence the `unused_variables` lint. This probably isn't good for users, seeing as how they'll have to remove the underscore if they want to use the parameters. (I mean, they technically don't have to remove the underscore... but usually you don't keep a leading underscore on parameters you're using.) ## Solution Changes `bevy_reflect::RegisterForReflection::__register()` to `#[expect(unused_variables)]`, and removes the underscores from its parameter names. ## Testing N/A
…_without_reason/bevy_sprite
I broke the history in a weird way. I'm going to re-make this PR as a new PR. |
Your PR increases Bevy Minimum Supported Rust Version. Please update the |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 6, 2025
…ttributes_without_reason)]` (Attempt 2) (#17184) I broke the commit history on the other one, #17160. Woops. # Objective - #17111 ## Solution Set the `clippy::allow_attributes` and `clippy::allow_attributes_without_reason` lints to `deny`, and bring `bevy_sprite` in line with the new restrictions. ## Testing `cargo clippy` and `cargo test --package bevy_sprite` were run, and no errors were encountered.
mrchantey
pushed a commit
to mrchantey/bevy
that referenced
this pull request
Feb 4, 2025
…unused variables, rather than putting underscores on the parameter names (bevyengine#17171) # Objective While checking over bevyengine#17160, it occurred to me that rust-analyzer will copy the method signature exactly, when using tab completion trait methods. This includes provided trait methods that use underscores to silence the `unused_variables` lint. This probably isn't good for users, seeing as how they'll have to remove the underscore if they want to use the parameters. (I mean, they technically don't have to remove the underscore... but usually you don't keep a leading underscore on parameters you're using.) ## Solution Changes `bevy_reflect::RegisterForReflection::__register()` to `#[expect(unused_variables)]`, and removes the underscores from its parameter names. ## Testing N/A
mrchantey
pushed a commit
to mrchantey/bevy
that referenced
this pull request
Feb 4, 2025
…ttributes_without_reason)]` (Attempt 2) (bevyengine#17184) I broke the commit history on the other one, bevyengine#17160. Woops. # Objective - bevyengine#17111 ## Solution Set the `clippy::allow_attributes` and `clippy::allow_attributes_without_reason` lints to `deny`, and bring `bevy_sprite` in line with the new restrictions. ## Testing `cargo clippy` and `cargo test --package bevy_sprite` were run, and no errors were encountered.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Rendering
Drawing game state to the screen
C-Code-Quality
A section of code that is hard to understand or change
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Blocked
This cannot move forward until something else changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
clippy::allow_attributes
andclippy::allow_attributes_without_reason
lints #17111Solution
Set the
clippy::allow_attributes
andclippy::allow_attributes_without_reason
lints todeny
, and bringbevy_audio
in line with the new restrictions.No code changes have been made - except if a lint that was previously
allow(...)
'd could be removed via small code changes. For example,unused_variables
can be handled by adding a_
to the beginning of a field's name.Testing
cargo clippy
andcargo test --package bevy_sprite
were run, and no errors were encountered.