Skip to content

CI: run lint, detekt, and ktlint on PRs #63

@patrickrb

Description

@patrickrb

Follow-up from #27 / PR #58.

CI currently runs testDebugUnitTest + assembleRelease. No static
analysis — Android lint warnings are silent, Kotlin code-style isn't
enforced, and obvious correctness issues (NPE risks, unused params)
sneak through.

What to do

  • Android lint: add ./gradlew lintDebug to the workflow. There's
    already a lintVitalRelease running as part of assembleRelease
    the broader lintDebug is what's missing.
  • detekt: add the detekt Gradle plugin + a baseline config focused
    on correctness rules (potential-bugs, exceptions, coroutines).
    Generate a baseline file initially so existing warnings don't gate
    the PR — new code is what we want to police.
  • ktlint: add the ktlint Gradle plugin with the standard Kotlin
    style rules.

Phase the rollout: land each tool in warn-only mode first (CI runs
the task but doesn't fail on warnings), let the team see a few PRs'
worth of output, then flip to blocking. Don't introduce three new
blockers in one PR.

Why this matters

Catching issues before review is cheaper than the review pass. Style
enforcement also removes a class of review nit-picking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions