commons-app / apps-android-commons

The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons
https://commons-app.github.io/
Apache License 2.0
1k stars 1.18k forks source link

Remove usages of assert #3463

Open macgills opened 4 years ago

macgills commented 4 years ago
/**
 * Throws an [AssertionError] if the [value] is false
 * and runtime assertions have been enabled on the JVM using the *-ea* JVM option.
 */
@kotlin.internal.InlineOnly
public inline fun assert(value: Boolean) {
    assert(value) { "Assertion failed" }
}

and runtime assertions have been enabled on the JVM using the -ea JVM option. They have not been enabled and won't be. Replace with appropriate AssertThats.

u7281898 commented 1 year ago

Hi, could I please be assigned to this issue.

nicolas-raoul commented 9 months ago

@u7281898 Any progress on this? 🙂

Atheer2104 commented 6 months ago

Hello me and four other people are having 1 week to work on open source issue, this is part of our course assignment. We would like to work on this. Can you add me as an assigne ?

nicolas-raoul commented 6 months ago

@Atheer2104 It is yours! 🙂

cyrille-artho commented 6 months ago

I think you can fix this with a one-line shell script:

find . -name '*.kt' | xargs grep -l 'assert *(' | xargs sed -i -e 's/assert *(/AssertThat (/'
nicolas-raoul commented 3 weeks ago

@Atheer2104 Did you get a chance to check the feedback on your pull request at https://github.com/commons-app/apps-android-commons/pull/5574#issuecomment-1976599786 ?

nicolas-raoul commented 2 weeks ago

@Atheer2104 I unassign for now, but if you are you still working on this, please let us know. If no answer, someone else may be assigned to it. Thanks a lot. :-)