You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
About the warnings, we are working in adding an static code analyzer to the CI system. We hope it'll be ready soon to help to avoid/fix such amount of warnings.
i executed lint locally and my result was green, but anyway, you are right. We are moving our pipelines from BitRise to GitHub Actions, and the lint part is missing there. Another workflow for lint could be a good idea. We'll take this as a nice improvement to do, or, if you'd like to contribute on that you know you are welcome 🥇
well, lint was integrated and runing on bitrise, as well as the other jobs running on CI. Now everything running in GA... not five years but i can understand your disappointment.
repeatOnLifecycle is called from onStart, not from a View-scoped callback → RepeatOnLifecycleWrongUsage. androidx guidance: use it in onViewCreated (Fragments) / onCreate (Activities). Since this is a DialogFragment with no content view, collect from onCreate (or a viewLifecycleOwner-tied scope), not onStart.
owncloudApp/lint.xml only ignores MissingTranslation/MissingQuantity, so this error is not suppressed.
Why CI still misses it: the GH Actions migration added a detekt workflow, but Detekt does not run Android Lint — RepeatOnLifecycleWrongUsage is an androidx.lifecycle Lint check. No workflow runs ./gradlew lintDebug, so the error stays green in CI. A lint workflow (or a lintDebug step) would catch it.
Activity
jesmrec commentedon Oct 2, 2024
About the warnings, we are working in adding an static code analyzer to the CI system. We hope it'll be ready soon to help to avoid/fix such amount of warnings.
Will take a look to the error.
Thanks for reporting
[-][BUG]Lint reports an error[/-][+][BUG] Lint reports an error[/+]hannesa2 commentedon Jun 14, 2025
I guess you still don't run
./gradlew lintin your CIOn recent master 3caa33f , there are still issues
jesmrec commentedon Jun 16, 2025
i executed lint locally and my result was green, but anyway, you are right. We are moving our pipelines from BitRise to GitHub Actions, and the lint part is missing there. Another workflow for lint could be a good idea. We'll take this as a nice improvement to do, or, if you'd like to contribute on that you know you are welcome 🥇
hannesa2 commentedon Jun 16, 2025
Finally after 5 years ! #2816
This was one reason why I reduced my affords here to a minimum
jesmrec commentedon Jun 16, 2025
well, lint was integrated and runing on bitrise, as well as the other jobs running on CI. Now everything running in GA... not five years but i can understand your disappointment.
DeepDiver1975 commentedon Jul 2, 2026
Still reproducible on current master.
Lint error (real, not suppressed):
ManageAccountsDialogFragment.onStart()→subscribeToViewModels()callscollectLatestLifecycleFlow(...)atManageAccountsDialogFragment.kt:210and:230.repeatOnLifecycle(...)atFragmentExt.kt:108.repeatOnLifecycleis called fromonStart, not from aView-scoped callback →RepeatOnLifecycleWrongUsage. androidx guidance: use it inonViewCreated(Fragments) /onCreate(Activities). Since this is aDialogFragmentwith no content view, collect fromonCreate(or aviewLifecycleOwner-tied scope), notonStart.owncloudApp/lint.xmlonly ignoresMissingTranslation/MissingQuantity, so this error is not suppressed.Why CI still misses it: the GH Actions migration added a
detektworkflow, but Detekt does not run Android Lint —RepeatOnLifecycleWrongUsageis anandroidx.lifecycleLint check. No workflow runs./gradlew lintDebug, so the error stays green in CI. Alintworkflow (or alintDebugstep) would catch it.🤖 Generated with Claude Code