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

Projects
None yet
3 participants
@phansch
Collaborator

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

RIIR update lints: Generate deprecated lints
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(
"{}",
"{}",
);"#,

This comment has been minimized.

@phansch

phansch Oct 31, 2018

Collaborator

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.

This comment has been minimized.

@matthiaskrgr

matthiaskrgr Oct 31, 2018

Collaborator

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 )

This comment has been minimized.

@phansch

phansch Oct 31, 2018

Collaborator

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

This comment has been minimized.

@matthiaskrgr

matthiaskrgr Oct 31, 2018

Collaborator

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

This comment has been minimized.

@flip1995

flip1995 Oct 31, 2018

Collaborator

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

Yep #3172 (comment)

@phansch

This comment has been minimized.

Collaborator

phansch commented Oct 31, 2018

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

@flip1995

This comment has been minimized.

Collaborator

flip1995 commented Nov 1, 2018

LGTM!

bors r+

bors bot added a commit that referenced this pull request Nov 1, 2018

Merge #3388
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

This comment has been minimized.

Collaborator

flip1995 commented Nov 1, 2018

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

@bors

This comment has been minimized.

Contributor

bors bot commented Nov 1, 2018

@phansch

This comment has been minimized.

Collaborator

phansch commented Nov 2, 2018

bors r=flip1995

bors bot added a commit that referenced this pull request Nov 2, 2018

Merge #3161 #3387 #3388
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

This comment has been minimized.

Contributor

bors bot commented Nov 2, 2018

Build failed (retrying...)

bors bot added a commit that referenced this pull request Nov 2, 2018

Merge #3388
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>
@bors

This comment has been minimized.

Contributor

bors bot commented Nov 2, 2018

@bors bors bot merged commit 7e02721 into rust-lang-nursery:master Nov 2, 2018

3 checks passed

bors Build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@phansch phansch deleted the phansch:riir_update_lints_py_gen_deprecated branch Nov 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment