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

Commit

Permalink
Issue #1: Add ktlint (Kotlin linter).
Browse files Browse the repository at this point in the history
  • Loading branch information
pocmo committed Mar 23, 2018
1 parent 2bb41dc commit dc4960a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ task clean(type: Delete) {
delete rootProject.buildDir
}

// -------------------------------------------------------------------------------------------------
// -- detekt ---------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------------

detekt {
version = "1.0.0.RC6-4"
profile("main") {
Expand All @@ -40,3 +44,22 @@ detekt {
output = "$projectDir/build/reports/detekt"
}
}

// -------------------------------------------------------------------------------------------------
// -- ktlint ---------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------------

configurations {
ktlint
}

dependencies {
ktlint "com.github.shyiko:ktlint:0.20.0"
}

task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args "components/**/*.kt"
}

0 comments on commit dc4960a

Please sign in to comment.