-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(rwlock_atomic): add new lints for using RwLock with atomic types #16180
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
base: master
Are you sure you want to change the base?
Conversation
|
Hey @blyxyas, would you be interested in reviewing? |
|
Yes @Tunglies I'll review this one, could you give us some more information in the pull request's description? Is this fixing any existing issues? In general, more context on why this pull request is needed would be very appreciated. Thanks! |
I found Mutex rules |
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.
Seems that the lint logic is really similar to mutex_atomic, could you merge these?
|
Reminder, once the PR becomes ready for a review, use |
…nts for using RwLock with atomic types
|
Hey @blyxyas I have merged the lints and renamed the lint file and its uibless counterpart. Looking forward to your feedback :3 |
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
|
Hey @blyxyas, wondering if you still have interested with this? :) |
|
hi @Tunglies, I'm still interested in this pull request, don't worry (unless you have some time constraints), it's just that sadly FOSS is no longer my full-time job, so having time to review is a complex task. Don't worry, I'll still review it ( ^..^)ノ |
|
Not really, just doubt if I was doing useful contributing at time. Feel free to reviewing :0 |
changelog: [`rwlock_atomic`]: new lint changelog: [`rwlock_integer`]: new lint
…ld be used instead - Added new lints: `RWLOCK_ATOMIC`, `RWLOCK_INTEGER`, `MUTEX_ATOMIC`, and `MUTEX_INTEGER` to check for inappropriate usage of `RwLock` and `Mutex` with atomic types. - Created a new lint pass `SyncGuard` to handle the linting logic for these cases. - Updated tests to cover various scenarios where `RwLock` and `Mutex` are used with atomic types, ensuring that the lints trigger correctly. - Removed outdated test files and added new tests to validate the behavior of the new lints. - Rename rwlock_atomic.rs to rwlock_mutex_atomic.rs
8b30fcc to
a90f3e0
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
changelog: [
rwlock_atomic]: new lintchangelog: [
rwlock_integer]: new lint