Skip to content
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

Implement internal lint for MSRV lints #8313

Merged
merged 1 commit into from
Mar 1, 2022

Conversation

flip1995
Copy link
Member

This internal lint checks if the extract_msrv_attrs! macro is used if
a lint has a MSRV. If not, it suggests to add this attribute to the lint
pass implementation.

Following up #8280 (comment). This currently doesn't implement the documentation check. But since this is just an extension of this lint, I think this is a good MVP of this lint.

r? @camsteffen

cc @xFrednet

changelog: none

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 19, 2022
/// ### What it does
/// Check that the `extract_msrv_attr!` macro is used, when a lint has a MSRV.
///
pub INVALID_MSRV_ATTR_IMPL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see an implementation this quickly after the suggestion! I only skimmed over the code, maybe MISSING_MSRV_ATTR_IMPL would be a slightly better name 🤔. 🙃

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xFrednet feel free to self-assign this PR if you like

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still trying to limit my work on Clippy while writing my bachelor thesis. Clippy is just more fun and productive 😂. I have some other reviews waiting on me, if those are further along, I can take another look at it. But that might take some time, so for a timely review, it's probably better if you stay assigned. But thank you very much for the offer! :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was unsure about the name.

(I intentionally assigned Cam, so that you don't get distracted again)

@camsteffen Since you collected a lot of reviews recently, you can leave this PR at the back of your review queue. There shouldn't be any rush getting this in.

@bors
Copy link
Contributor

bors commented Feb 22, 2022

☔ The latest upstream changes (presumably #8451) made this pull request unmergeable. Please resolve the merge conflicts.

@xFrednet
Copy link
Member

I want to get back into reviewing some PRs now that my vacation is coming to an end. I'll steal the review as @camsteffen offered. @flip1995 you can rebase if you want. I should have it reviewed by Tuesday 🙃

r? @xFrednet

@flip1995
Copy link
Member Author

Done 👍

Copy link
Member

@xFrednet xFrednet left a 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 to me. I found two small NITs and there is the open suggestion to rename the lint. The current name is also fine with me if you prefer this one 🙃.

I hope I wasn't to nit picky ^^

@xFrednet xFrednet added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Feb 26, 2022
This internal lint checks if the `extract_msrv_attrs!` macro is used if
a lint has a MSRV. If not, it suggests to add this attribute to the lint
pass implementation.
@flip1995 flip1995 force-pushed the msrv-internal-lint branch from bcee65a to bca4ee7 Compare March 1, 2022 09:40
@flip1995
Copy link
Member Author

flip1995 commented Mar 1, 2022

Addressed all comments, renamed lint, and rebased 👍

@flip1995
Copy link
Member Author

flip1995 commented Mar 1, 2022

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Mar 1, 2022
@xFrednet
Copy link
Member

xFrednet commented Mar 1, 2022

Looks good to me, thank you for the new lint. I also had fun reviewing it 👍

@bors r+

@bors
Copy link
Contributor

bors commented Mar 1, 2022

📌 Commit bca4ee7 has been approved by xFrednet

@bors
Copy link
Contributor

bors commented Mar 1, 2022

⌛ Testing commit bca4ee7 with merge 28b1fe5...

@bors
Copy link
Contributor

bors commented Mar 1, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 28b1fe5 to master...

@bors bors merged commit 28b1fe5 into rust-lang:master Mar 1, 2022
@flip1995 flip1995 deleted the msrv-internal-lint branch March 2, 2022 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants