rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

new lint `legacy_numeric_constants`

Open pitaj opened this issue 1 year ago • 4 comments

Rework of #10997

Currently this uses path matching instead of diagnostic items. I plan on adding the diagnostic items to rustc soon but figured I would open this in the meantime. I'll leave it up to the clippy team on whether they'd rather wait or not.

Closes #10995

changelog: New lint [legacy_numeric_constants]

pitaj avatar Feb 18 '24 18:02 pitaj

r? @dswij

rustbot has assigned @dswij. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot avatar Feb 18 '24 18:02 rustbot

r? xFrednet since they reviewed the last one. Also, CC @Centri3

pitaj avatar Feb 18 '24 18:02 pitaj

:umbrella: The latest upstream changes (presumably #12306) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Feb 19 '24 09:02 bors

Hey, thank you for picking this up. This is on my todo list for next week, you should have a review by Friday, the latest. :)

xFrednet avatar Feb 25 '24 21:02 xFrednet

Thanks for taking a look. It seems like the next toolchain update should be on the 7th, which should include all the necessary diagnostic items.

I've made the changes you suggested, but wait to merge until I modify this to use the diag items.

pitaj avatar Mar 04 '24 01:03 pitaj

Welp, in working on the implementation I discovered that the diag items were still incomplete. So I guess we'll wait another two weeks 🙃

pitaj avatar Mar 10 '24 06:03 pitaj

Okay, good to know :D I'll mark this as waiting for you. Once the next update is ready, you can push the update, and it should show up in my inbox again. Otherwise, you can also always ping me :D

@rustbot author

xFrednet avatar Mar 10 '24 10:03 xFrednet

:umbrella: The latest upstream changes (presumably #12511) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Mar 20 '24 00:03 bors

@rustbot ready

pitaj avatar Mar 21 '24 23:03 pitaj

Looks like bors commands still don't work in reviews... Let's try this again:

@bors delegate+

xFrednet avatar Mar 24 '24 10:03 xFrednet

:v: @pitaj, you can now approve this pull request!

If @xFrednet told you to "r=me" after making some further change, please make that change, then do @bors r=xFrednet

bors avatar Mar 24 '24 10:03 bors

Actually, let's not r+ it yet. I just remembered that @Manishearth suggested in the last meeting, that we discuss/notify others about new lints first to see if someone has comments on it. So let's keep this open for a week, to see if others have any thoughts on it. I'll write something for Zulip :)

Zulip: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/New.20.60legacy_numeric_constants.60.20lint.20rust-clippy.2312312/near/429186612

xFrednet avatar Mar 24 '24 10:03 xFrednet

It has been a week and all comments have been positive, so I'm merging this now. Thank you for the new lint :D

@bors r+

@rustbot label -S-final-comment-period

xFrednet avatar Mar 30 '24 17:03 xFrednet

:pushpin: Commit f2e91ab1b9aaab23b81fc5ea5de43367cb9b9e6d has been approved by xFrednet

It is now in the queue for this repository.

bors avatar Mar 30 '24 17:03 bors

:hourglass: Testing commit f2e91ab1b9aaab23b81fc5ea5de43367cb9b9e6d with merge cebf879de895deae27be8593692ce54023d7f48e...

bors avatar Mar 30 '24 17:03 bors

:sunny: Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test Approved by: xFrednet Pushing cebf879de895deae27be8593692ce54023d7f48e to master...

bors avatar Mar 30 '24 17:03 bors