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

RIIR update lints: Generate deprecated lints #3388

Merged
merged 2 commits into from
Nov 2, 2018

Conversation

phansch
Copy link
Member

@phansch phansch commented Oct 31, 2018

The update script now also generates the 'register_removed' section in
clippy_lints/src/lib.rs.

Also, instead of using let mut store ..., I added a new identifier
line so that the replacement will continue to work in case let mut store ... ever changes.

cc #2882

The update script now also generates the 'register_removed' section in
`clippy_lints/src/lib.rs`.

Also, instead of using `let mut store ...`, I added a new identifier
line so that the replacement will continue to work in case `let mut
store ...` ever changes.
r#" store.register_removed(
"{}",
"{}",
);"#,
Copy link
Member Author

Choose a reason for hiding this comment

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

This multi-line literal feels... brittle?

I found indoc by @dtolnay which could make this a little bit nicer. However, the code is unit tested and I'm not sure if it's worth adding a new dependency.

Copy link
Member

Choose a reason for hiding this comment

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

Can we make a bet that this will trigger clippys filter_maplint?
(only nagging because I found another sample of this when starting to clean up pedantic warnings and was not sure if this was a FP or TP :p )

Copy link
Member Author

@phansch phansch Oct 31, 2018

Choose a reason for hiding this comment

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

oh, yeah. I forgot to run the dogfood tests locally :(
Will fix it later today.

Copy link
Member

Choose a reason for hiding this comment

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

It's not gonna catch that because pedantic lints are not (yet..) enabled I think.

Copy link
Member

Choose a reason for hiding this comment

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

pedantic lints are not (yet..) enabled I think.

Yep #3172 (comment)

@phansch phansch added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Oct 31, 2018
@phansch
Copy link
Member Author

phansch commented Oct 31, 2018

I changed the filter(x).map(y) to filter_map and fixed the dogfood issues. should be good now.

@phansch phansch 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 Oct 31, 2018
@flip1995
Copy link
Member

flip1995 commented Nov 1, 2018

LGTM!

bors r+

bors bot added a commit that referenced this pull request Nov 1, 2018
3388: RIIR update lints: Generate deprecated lints r=flip1995 a=phansch

The update script now also generates the 'register_removed' section in
`clippy_lints/src/lib.rs`.

Also, instead of using `let mut store ...`, I added a new identifier
line so that the replacement will continue to work in case `let mut
store ...` ever changes.

cc #2882

Co-authored-by: Philipp Hansch <dev@phansch.net>
@flip1995
Copy link
Member

flip1995 commented Nov 1, 2018

Oh forgot that macos nightly is missing. r=me when available again

@bors
Copy link
Contributor

bors bot commented Nov 1, 2018

Build failed

@phansch
Copy link
Member Author

phansch commented Nov 2, 2018

bors r=flip1995

bors bot added a commit that referenced this pull request Nov 2, 2018
3161: New lint: Unknown clippy lints r=phansch a=flip1995

This is the Clippy version of the `rustc` lint `unknown_lints`. The behavior of this lint is pretty much the same.

Before this is merged a small change in the compiler needs to be done: `CheckLintNameResult` needs to be public. See rust-lang/rust#54106

3387: Replace big if/else expression with match r=flip1995 a=mikerite



3388: RIIR update lints: Generate deprecated lints r=phansch a=phansch

The update script now also generates the 'register_removed' section in
`clippy_lints/src/lib.rs`.

Also, instead of using `let mut store ...`, I added a new identifier
line so that the replacement will continue to work in case `let mut
store ...` ever changes.

cc #2882

Co-authored-by: flip1995 <9744647+flip1995@users.noreply.github.com>
Co-authored-by: flip1995 <hello@philkrones.com>
Co-authored-by: Michael Wright <mikerite@lavabit.com>
Co-authored-by: Philipp Hansch <dev@phansch.net>
@bors
Copy link
Contributor

bors bot commented Nov 2, 2018

Build failed (retrying...)

bors bot added a commit that referenced this pull request Nov 2, 2018
3388: RIIR update lints: Generate deprecated lints r=phansch a=phansch

The update script now also generates the 'register_removed' section in
`clippy_lints/src/lib.rs`.

Also, instead of using `let mut store ...`, I added a new identifier
line so that the replacement will continue to work in case `let mut
store ...` ever changes.

cc #2882

Co-authored-by: Philipp Hansch <dev@phansch.net>
@phansch phansch removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Nov 2, 2018
@bors
Copy link
Contributor

bors bot commented Nov 2, 2018

@bors bors bot merged commit 7e02721 into rust-lang:master Nov 2, 2018
@phansch phansch deleted the riir_update_lints_py_gen_deprecated branch November 2, 2018 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants