[BUG] Lint reports an error
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
Research direction
Run ./gradlew :owncloudApp:lintDebug and inspect owncloudApp/src/main/java/com/owncloud/android/extensions/FragmentExt.kt around line 89, where ManageAccountsDialogFragment.onStart uses repeatOnLifecycle. Align that usage with the lint guidance for lifecycle placement, then rerun the lint task and confirm the RepeatOnLifecycleWrongUsage error is gone.
Written by the indexing model from the issue text.
Description
I guess you don't run lint during the pull request pipeline, otherwise you would see during
./gradlew :owncloudApp:lintDebug
this
Lint found 1 errors, 847 warnings. First failure:/Users/hannes/git/owncloud-android/owncloudApp/src/main/java/com/owncloud/android/extensions/FragmentExt.kt:89: Error: Wrong usage of repeatOnLifecycle from ManageAccountsDialogFragment.onStart. [RepeatOnLifecycleWrongUsage from androidx.lifecycle]
repeatOnLifecycle(lifecycleState) {
^Explanation for issues of type "RepeatOnLifecycleWrongUsage": The repeatOnLifecycle APIs should be used when the View is created, that is in the onCreate lifecycle method for Activities, or onViewCreated in case you're using Fragments. Vendor: Android Open Source Project Identifier: androidx.lifecycle Feedback: https://issuetracker.google.com/issues/new?component=413132
- Dominant language
- Kotlin
- Stars
- 4.2k
- Forks
- 3.1k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from owncloud/android
-
Technical
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Contributions are welcome p3-medium Type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Feature request Share by Public Link
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Feature request Share by Public Link
Difficulty 4/5 3-5 days Newbie friendliness 58/100
All issues in owncloud/android
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
Issue: Bug
Difficulty 1/5 Under an hour Newbie friendliness 91/100
OpenAPITools/openapi-generator#24978 ·
-
helsemelding-json-schema json-schema-core
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
contributor: external needs review
Difficulty 2/5 1-3 hours Newbie friendliness 82/100