Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

NF: uses kotlin.test instead of Matcher and Junit

Open Arthur-Milchior opened this issue 3 years ago • 4 comments

This ensure that the value is non null by contract, so we can remove ulterior !!

Replace and improve #12352

Arthur-Milchior avatar Sep 08 '22 23:09 Arthur-Milchior

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

BrayanDSO avatar Sep 11 '22 00:09 BrayanDSO

@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

BrayanDSO avatar Sep 12 '22 13:09 BrayanDSO

I don't think I described consistency sufficiently (sorry). I've elaborated in a review comment

david-allison avatar Sep 12 '22 22:09 david-allison

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

david-allison avatar Sep 14 '22 06:09 david-allison

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

github-actions[bot] avatar Nov 18 '22 02:11 github-actions[bot]