add `--explain` subcommand by llogiq · Pull Request #8952 · rust-lang/rust-clipp...
source link: https://github.com/rust-lang/rust-clippy/pull/8952
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
add --explain
subcommand
#8952
Merged
Conversation
Collaborator
rust-highfive commented on Jun 5
r? @dswij (rust-highfive has picked a reviewer for you, use r? to override) |
added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label
I started out trying to get a proc macro to work, but then I found Alexey Kladow's blog post about self-modifying code and I thought this might be just the right application for the technique. |
This one looks interesting, and my reviewing queue is currently relatively small. I would take over the review. (If you want to keep it @dswij, feel free to say so) r? @xFrednet @llogiq could you maybe link the blog post? Your comment reminded me of a post, I've read before. Also, as a side node, I sometimes find it confusing, when to use the double dashes after |
Member
xFrednet left a comment
The implementation itself looks good to be. I haven't done a full test, but the initial tries seem good.
While I like the concept of using a test, it feels a bit off in Clippy's codebase since we already do this kind of generation in clippy_dev
. This introduces another location with little benefit in comparison to adding it to clippy_dev
. At least that's my impression. clippy_dev
doesn't have the regex crate, but that should be simple to avoid/rewrite.
cc: @Serial-ATA This might be interesting, since you're working on the metadata collection/lint list. Feel free to ignore this as well
Outdated Show resolved
Outdated Show resolved
Outdated Show resolved
Contributor
Serial-ATA commented on Jun 7
Couldn't |
This would be a really cool thing to have -- especially if we can somehow add this feature to rust-analyzer. Thank you for your work! |
So, I see two ways to improve on this:
|
Contributor
Author
llogiq commented 18 days ago
This version should deal with the merge conflicts arising from doc changes. I didn't get to changing the code to use |
Contributor
Author
llogiq commented 18 days ago
Hmmm...I should not name the files ".md" when they don't contain markdown... |
With the following force-push, I removed the final newline from the md files as well as @dswij r? |
Member
xFrednet commented 16 days ago
Sorry, for the late replay, I moved last week and life is currently still a bit chaotic. Reviewing this is on my todo list for this weekend. If @dswij want's to take over that would also be fine for me |
Contributor
Author
llogiq commented 11 days ago
Member
xFrednet left a comment
Overall, looks good to me. I also like the location in cargo-clippy
. I've also played around with it and to works well :). My GitHub is actually struggling a bit with this many changes ^^.
Thank you for your patience, the last weeks have been very full for me
Member
xFrednet commented 11 days ago
Hey @rust-lang/clippy, this PR adds the |
added the S-needs-discussion Status: Needs further discussion before merging or work can be started label
Contributor
Author
llogiq commented 10 days ago
I need to rebase to make the tests work. |
Contributor
Author
llogiq commented 10 days ago
We discussed wanting this three meetings ago, and I agreed to implement it. I don't think there were any objections during that meeting. Re the implementation: Splitting the files and using |
Member
xFrednet commented 7 days ago
I just wanted to make sure now that we had an actual implementation to play around with. It looks like everyone is cool with this :) This looks good to me, you can |
added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
and removed S-needs-discussion Status: Needs further discussion before merging or work can be started S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
labels
Contributor
Author
llogiq commented 6 days ago
@bors r=xFredNet |
Contributor
bors commented 6 days ago
Contributor
bors commented 6 days ago
Contributor
Author
llogiq commented 6 days ago
Thank you for the review, @xFrednet. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
No milestone
Successfully merging this pull request may close these issues.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK