Skip to content

feat: Add ktlint to project#1635

Open
tevincent wants to merge 23 commits into
mainfrom
ktlint
Open

feat: Add ktlint to project#1635
tevincent wants to merge 23 commits into
mainfrom
ktlint

Conversation

@tevincent

@tevincent tevincent commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces Kotlin Ktlint code style enforcement to the project, including configuration files, a GitHub Actions workflow for automated lint checking, and updates to dependencies. The main goal is to standardize code formatting and ensure linting is part of the CI process.

Ktlint integration and configuration:

  • Added a .editorconfig file with Ktlint-specific rules and customizations for Kotlin files, including disabling several standard rules and setting a maximum line length.
  • Added a config/ktlint/baseline.xml file to suppress existing Ktlint violations, enabling incremental adoption of linting.

CI/CD pipeline updates:

  • Updated .github/workflows/android.yml to add a new ktlint job that runs on every pull request, ensuring code style checks are automated in CI.

Dependency management:

  • Added the Ktlint Gradle plugin to gradle/libs.versions.toml for consistent linting across environments.

Submodule update:

  • Updated the Core submodule to a new commit, possibly to align with the new linting standards or other upstream changes.

depends on Infomaniak/android-core#484
depens on Infomaniak/android-core#490

@tevincent tevincent force-pushed the ktlint branch 20 times, most recently from 85bcc20 to f377a2c Compare June 6, 2025 13:10
@tevincent tevincent marked this pull request as draft June 10, 2025 06:22
@tevincent tevincent force-pushed the ktlint branch 2 times, most recently from dad4577 to 6da219d Compare August 14, 2025 06:28
@tevincent tevincent marked this pull request as ready for review August 14, 2025 06:28
@tevincent tevincent marked this pull request as ready for review July 8, 2026 15:45
Copilot AI review requested due to automatic review settings July 8, 2026 15:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Kotlin formatting/lint enforcement via ktlint, along with baselines to avoid fixing all existing violations at once, and wires a ktlint check into GitHub Actions CI.

Changes:

  • Register and apply the org.jlleitschuh.gradle.ktlint Gradle plugin and configure ktlint options/baseline.
  • Add ktlint baseline files (root + app) to suppress existing violations.
  • Add a dedicated CI job intended to run ktlint, plus a root .editorconfig with ktlint rule toggles.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
gradle/libs.versions.toml Adds ktlint plugin alias to the version catalog.
config/ktlint/baseline.xml Adds a root ktlint baseline file.
build.gradle.kts Applies/configures ktlint Gradle plugin and points to baseline.
app/config/ktlint/baseline.xml Adds an app-module ktlint baseline with existing violations.
.github/workflows/android.yml Adds a new CI job to run ktlint.
.editorconfig Introduces ktlint configuration and disables selected rules.

Comment thread .github/workflows/android.yml Outdated
Comment thread .github/workflows/android.yml
@tevincent tevincent enabled auto-merge July 9, 2026 06:46
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants