CI : Integrate ktlint into Github Actions#7
Merged
DongChyeon merged 2 commits intomainfrom May 29, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds ktlint to the Gradle version catalog and updates the GitHub Actions CI workflow to run ktlint style checks as part of the build.
- Introduces a
ktlintversion and plugin alias inlibs.versions.toml - Creates/updates the Android CI workflow to run
ktlintCheckalongsideassembleDebug
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| gradle/libs.versions.toml | Added ktlint version and plugin alias to version catalog |
| .github/workflows/android_ci.yml | New CI workflow runs ktlintCheck then builds the app |
Comments suppressed due to low confidence (2)
.github/workflows/android_ci.yml:9
- The CI trigger only covers
*.ktfiles. Consider adding**/*.ktsto also rerun CI when Kotlin script files change.
- - '**/*.kt'
.github/workflows/android_ci.yml:53
- This job runs lint and assemble but doesn't execute unit tests. Consider adding a
testorchecktask to ensure full code validation.
run: ./gradlew ktlintCheck assembleDebug
Comment on lines
42
to
+46
| jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
| android-library = { id = "com.android.library", version.ref = "agp" } | ||
| maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish" } | ||
| ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } |
There was a problem hiding this comment.
[nitpick] The plugin aliases list is not alphabetically ordered. Consider reordering entries to keep the version catalog organized.
Suggested change
| jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | |
| android-library = { id = "com.android.library", version.ref = "agp" } | |
| maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish" } | |
| ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } | |
| android-library = { id = "com.android.library", version.ref = "agp" } | |
| jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | |
| ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } | |
| maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish" } |
38ab874 to
042618f
Compare
042618f to
ebf7d9f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ktlint check to CI workflow to enforce consistent code style
CI will now fail if ktlint format violations are found