Skip to content

[C4GT Community]: Add GitHub Actions for Static Code Analysis using Ktlint and Detekt in mobile application repositories. #108

@Sneha6003

Description

@Sneha6003

Ticket Contents

Description

In the mobile application repositories built with Kotlin and powered by the AMRIT Platform REST APIs, there is currently no automated static code analysis integrated into the CI/CD workflow. Adding Ktlint and Detekt via GitHub Actions will help enforce consistent coding standards, detect code smells, and improve long-term maintainability.

Goals

Goals

  • Integrate Ktlint linter for enforcing Kotlin code style.
  • Integrate Detekt for identifying code quality issues.
  • Automate checks on every pull request and push.
  • Enforce fail-fast mechanism on violations.

Expected Outcome

  1. GitHub Actions pipelines will run Ktlint and Detekt on relevant branches
  2. Developers receive actionable feedback on code smells and formatting violations
  3. Codebase quality and consistency are improved across mobile repositories

Acceptance Criteria

  1. Workflows run on push and pull_request events
  2. CI fails when issues are detected
  3. Instructions are documented for contributors

Implementation Details

  • Validate plugins in build.gradle.kts or build.gradle
  • Confirm workflows run in local test and on GitHub

Mockups/Wireframes

No response

Product Name

AMRIT

Organisation Name

Piramal Swasthya Management and Research Institute

Domain

No response

Tech Skills Needed

Mobile

Organizational Mentor

@drtechie

Angel Mentor

No response

Complexity

Medium

Category

Mobile

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