-
Notifications
You must be signed in to change notification settings - Fork 1.7k
add suppress_restriction_lint_in_const
config
#9920
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Alexendoo (or someone else) soon. Please see the contribution instructions for more information. |
r? @xFrednet |
Hey @xFrednet , i think it's ready to go. Could you please review it? |
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.
Really solid start! Thank you for working on this issue :)
I hope that these suggestions are fairly simple. You're welcome to reach out if you'd like any help :)
☔ The latest upstream changes (presumably #9924) made this pull request unmergeable. Please resolve the merge conflicts. |
4da3bbd
to
9c0d3f2
Compare
@xFrednet thanks for your kindness and patience! Not quite sure everything is corrected as you requested, could you please review again? |
suppress_lint_in_const
configsuppress_restriction_lint_in_const
config
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.
@xFrednet thanks for your kindness and patience!
You're very welcome. Thank you for your kindness and contribution as well!
Not quite sure everything is corrected as you requested, could you please review again?
Yes, I have one suggestion, and then it should be good to go!
ping ping @xFrednet , let me know if anything wrong with my code.😄 |
Hey @naosense, everything is fine. It can sometimes take a few days, until I and other team members have time to review a PR. If you don't hear anything, it's nothing bad and a ping after some time can be helpful. I generally aim to give a review within 5 days, but it can go up to a week, if life gets busy or there are several other reviews waiting. This one is the next proper review in my queue. Maybe you'll get a review today, but it's more likely that it'll be tomorrow. :) |
@xFrednet got it, didn't know that before, I'm fine with any time, just follow your schedule |
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.
The implementation looks good! The tests still need some adjustment and then we can merge this :)
Hey @naosense
No problem. It's something I needed to get used to as well. You're welcome to reach out to me here or on Zulip if you're unsure about these things :) |
☔ The latest upstream changes (presumably #9865) made this pull request unmergeable. Please resolve the merge conflicts. |
d01f15e
to
2ac83f9
Compare
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.
Almost perfect, I found one last nit, which should be simple to fix.
Could you then squash the fix test
commits into one? Afterwards, we can merge this. Thank you for the effort you put into this, it's highly appreciated :)
/// suggested counterparts are unavailable in constant code. This | ||
/// configuration will cause restriction lints to trigger even | ||
/// if no suggestion can be made. | ||
(suppress_restriction_lint_in_const: bool = false), |
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.
The description sounds perfect :)
2ac83f9
to
eec5039
Compare
This looks good to me. Thank you for all the work you put into this and the quick updates. I hope you had fun working on this. It's an excellent addition to Clippy IMO. @bors r+ |
add `suppress_restriction_lint_in_const` config According to #9808 , add a new lint `suppress_lint_in_const` to report even in const context. BTW, i am not good at naming either, if anyone have a better idea, i am happy to change it. This PR is still in progress, so i keep it draft. - \[x] Followed [lint naming conventions][lint_naming] - \[x] Added passing UI tests (including committed `.stderr` file) - \[x] `cargo test` passes locally - \[x] Executed `cargo dev update_lints` - \[x] Added lint documentation - \[x] Run `cargo dev fmt` changelog: Enhancement: [`indexing_slicing`]: add new config `suppress-restriction-lint-in-const` to enable restriction lints, even if the suggestion might not be applicable r? `@xFrendet`
💔 Test failed - checks-action_test |
Looks like a fluke. @bors retry Be nice and let the CI be green this time :) |
add `suppress_restriction_lint_in_const` config According to #9808 , add a new lint `suppress_lint_in_const` to report even in const context. BTW, i am not good at naming either, if anyone have a better idea, i am happy to change it. This PR is still in progress, so i keep it draft. - \[x] Followed [lint naming conventions][lint_naming] - \[x] Added passing UI tests (including committed `.stderr` file) - \[x] `cargo test` passes locally - \[x] Executed `cargo dev update_lints` - \[x] Added lint documentation - \[x] Run `cargo dev fmt` changelog: Enhancement: [`indexing_slicing`]: add new config `suppress-restriction-lint-in-const` to enable restriction lints, even if the suggestion might not be applicable r? `@xFrendet`
💔 Test failed - checks-action_test |
It looks like something in the CI is broken. This is not specific to this PR. I'll merge it, once the problem has been resolved :) |
Let's give this another try @bors r+ |
💡 This pull request was already approved, no need to approve it again.
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
According to #9808 , add a new lint
suppress_lint_in_const
to report even in const context. BTW, i am not good at naming either, if anyone have a better idea, i am happy to change it.This PR is still in progress, so i keep it draft.
.stderr
file)cargo test
passes locallycargo dev update_lints
cargo dev fmt
changelog: Enhancement: [
indexing_slicing
]: add new configsuppress-restriction-lint-in-const
to enable restriction lints, even if the suggestion might not be applicabler? @xFrendet