-
Notifications
You must be signed in to change notification settings - Fork 53
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
solana: Configure clippy to deny possible truncation #285
Merged
nvsriram
merged 5 commits into
wormhole-foundation:main
from
johnsaigle:solana/clippy-truncation
Aug 21, 2024
Merged
solana: Configure clippy to deny possible truncation #285
nvsriram
merged 5 commits into
wormhole-foundation:main
from
johnsaigle:solana/clippy-truncation
Aug 21, 2024
Conversation
This file contains 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
a5-pickle
previously approved these changes
Mar 8, 2024
70a47ea
to
464bd61
Compare
Converted to Draft as this needs a rebase and possibly a different approach now that #311 is merged |
464bd61
to
68989f0
Compare
|
6 tasks
68989f0
to
4033532
Compare
1efa3b9
to
9bafb77
Compare
387f4b9
to
e068db2
Compare
e068db2
to
d74cac0
Compare
Adds a clippy rule to block the inclusion of code that can result in truncation (i.e. `as T` conversions) Adds linting directive to existing instances in the code and add comments about why they are safe Add a unit test on bitmap length to confirm that the maximum possible number of votes (i.e. maximum "length" of the bitmap) is within the limits of u8.
d74cac0
to
5563089
Compare
nvsriram
approved these changes
Aug 21, 2024
nonergodic
approved these changes
Aug 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a clippy rule that blocks the inclusion of code that can result in truncation problems (i.e. denies
<T> as <U>
conversions where T has a greater capacity than U)Adds linting directive to existing instances in the code and add comments about why they are safe
Also adds some unit test on the bitmap struct to make its edge-cases more legible.