Skip to content

[BUG] Lint reports more error #4686

Open

Description

@hannesa2

As a follow up of #4485 I observe on recent master eaf5788 more issues

Image

this is the output of lint

Image

Activity

  1. joragua commented on Sep 30, 2025

    @joragua
    Member

    Hi @hannesa2! Thanks for opening a new issue! 🍻 We will take a look at Lint as soon as we finish higher priority issues. By the way, #4485 is already included in our future milestone 4.7 so it's in our radar 😄

  2. hannesa2 commented on Feb 25, 2026

    @hannesa2
    ContributorAuthor

    Still the same on recent master 422 errors !

    Image
  3. hannesa2 commented on Jun 8, 2026

    @hannesa2
    ContributorAuthor

    Still the same on recent master 422 errors !
    Image

    Against my experience, that contributions make no sense here (sorry to say this), I made a fix of this error #4886.
    But it only fixes this !

  4. hannesa2 commented on Jun 8, 2026

    @hannesa2
    ContributorAuthor

    I see I reported lint issues twice #4485

  5. hannesa2 commented on Jun 8, 2026

    @hannesa2
    ContributorAuthor

    Next lint issue would be this:

     > Task :owncloudApp:lintReportMdmDebug
    Wrote HTML report to file:///home/runner/work/owncloud-android/owncloud-android/owncloudApp/build/reports/lint-results-mdmDebug.html
    
    > Task :owncloudApp:lintMdmDebug FAILED
    Lint found 457 errors, 805 warnings. First failure:
    
    /home/runner/work/owncloud-android/owncloud-android/owncloudApp/src/main/java/com/owncloud/android/extensions/FragmentExt.kt:101: 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
    
    
  6. hannesa2 commented on Jun 8, 2026

    @hannesa2
    ContributorAuthor

    You increase lint errors from 422 to 457, even I removed one.
    Really, you should add lint check in CI !

  7. DeepDiver1975 commented on Jul 2, 2026

    @DeepDiver1975
    Contributor

    Confirmed on current master (90f1483, 4.8.2):

    • RepeatOnLifecycleWrongUsage still fires — FragmentExt.kt:108 calls repeatOnLifecycle inside collectLatestLifecycleFlow, which runs in lifecycleScope.launch from arbitrary lifecycle points rather than onCreate/onViewCreated. Not suppressed: owncloudApp/lint.xml only ignores MissingTranslation/MissingQuantity.
    • No CI lint gate: none of the 10 workflows in .github/workflows/ run lint/lintDebug (detekt runs, lint does not), so the count is free to grow — which matches your 422→457 observation.

    This is the same rule already tracked as the sibling issue 4485 (milestone 4.7); this issue's distinct, actionable part is the missing ./gradlew :owncloudApp:lint* step in CI. Note PR 4886 ("fix: make lint work") is closed unmerged, so the regression is unaddressed.

    Suggest: consolidate the lint-rule fixes under 4485 and keep this one scoped to "add a lint check to CI" (baseline-gated if a big-bang fix isn't feasible). No fix pushed from here — flagging state only.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions