Split assert - #16677
Conversation
|
Sadly, I accidentally deleted the branch connected to my previous PR, causing it to close. @ada4a |
|
Lintcheck changes for 054f2c8
This comment will be updated if you push new changes |
Happens to the best of us, don't worry... Looking at Lintcheck, there seem to be some classes of cases where we don't really want to lint:
|
I'm not sure I understand the comment about lintcheck. can you clarify please? This is based on issue 1810. |
|
Ah, sorry. Lintcheck is a thing where the PR is run on a bunch of popular crates, in order to see if the lint is doing the right thing, and catch false positives. You can see its results in #16677 (comment) by clicking on the |
|
in the changelog message, the lint name should be in backticks ( |
|
My latest update passes most tests, but the clippy test complains about collapsing my span_lint_and_then call into one (?) line. cargo dev fmt has a different idea. How does this get resolved? On the other front, it now supports debug_assert!() as well as assert!(). I also improved the handling of Or. |
Ah no, it also suggests switching to span_lint_and_sugg(cx, ASSERT_MULTIPLE, e.span, "multiple asserts combined into one", "consider writing", am_visitor.suggests.join("\n"), Applicability::MaybeIncorrect) |
|
Also, I'm not sure how you ended up putting a bunch of other people's commits onto your branch?.. Try |
|
@ada4a Any comments? |
|
Sorry, hadn't had the time to look at this yet, I'll probably do so tomorrow |
|
Reminder, once the PR becomes ready for a review, use |
|
rustbot has assigned @samueltardieu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
a2a87e5 to
ad6b9e2
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| ManualNoopWaker: manual_noop_waker::ManualNoopWaker = manual_noop_waker::ManualNoopWaker::new(conf), | ||
| ByteCharSlice: byte_char_slices::ByteCharSlice = byte_char_slices::ByteCharSlice, | ||
| ManualAssertEq: manual_assert_eq::ManualAssertEq = manual_assert_eq::ManualAssertEq, | ||
| AssertMultiple: assert_multiple::AssertMultiple = assert_multiple::AssertMultiple, |
There was a problem hiding this comment.
Indentation level is incorrect
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks for pointing this out. I'll look into it. |
|
Sorry for all the waiting Jim, I seem to not have the energy to bring this to completion. Let me reroll.. @rustbot reroll |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Apply suggestions from code review Co-authored-by: Ada Alakbarova <58857108+ada4a@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Apply suggestions from code review Co-authored-by: Ada Alakbarova <58857108+ada4a@users.noreply.github.com>
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
View all comments
Closes #1810
changelog: [
assert_multiple]: Add a lint for asserts with multiple boolean tests