Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Add ktlintFormat task for formatting code following ktlint rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
pocmo authored and mergify[bot] committed Aug 17, 2021
1 parent c858eb1 commit 0e76a5e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,13 @@ task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "**/*.kt"
args "app/**/*.kt", "!**/build", "buildSrc/**/*.kt"
}


task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "-F", "app/**/*.kt", "!**/build", "buildSrc/**/*.kt"
}

0 comments on commit 0e76a5e

Please sign in to comment.