NF: uses kotlin.test instead of Matcher and Junit
This ensure that the value is non null by contract, so we can remove ulterior !!
Replace and improve #12352
I believe that https://github.com/ankidroid/Anki-Android/blob/main/lint-rules/src/main/java/com/ichi2/anki/lint/rules/JUnitNullAssertionDetector.kt isn't working as expected. If it were the case, these changes should have been flagged by lint ages ago
@david-allison, in your goal of consistency, is the approach of https://github.com/ankidroid/Anki-Android/pull/12352#issuecomment-1242825257 fine?
I believe that both kotlin.test and kotlin.test.junit both have contracts, and as the junit module delegates to the same asserter of junit, shouldn't be a problem
I don't think I described consistency sufficiently (sorry). I've elaborated in a review comment
Can we take this back to a GitHub issue or Discord?
This is a massive undertaking. I'd struggle to find justification to accept the PR, and I don't feel this is a productive use of time.
EDIT: I've written up a longer post: https://github.com/ankidroid/Anki-Android/issues/12384#issuecomment-1246376286
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically