Skip to content

Commit

Permalink
Add detekt and fix detected issues (#4)
Browse files Browse the repository at this point in the history
* Add detekt and fix all issues

* Remove spread operator

* Add lint check together with detekt
  • Loading branch information
samuolis authored May 12, 2020
1 parent 7bb85dc commit 38c719d
Show file tree
Hide file tree
Showing 8 changed files with 686 additions and 28 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ jobs:
- stage: build
name: build
script: ./gradlew build
- stage: detekt & lint
name: detekt & lint
script: ./gradlew detekt lint

11 changes: 11 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@ allprojects {
maven(url = "https://jitpack.io")
}
}

plugins {
id("io.gitlab.arturbosch.detekt").version(Versions.DETEKT_RUNTIME)
}

detekt {
buildUponDefaultConfig = true
parallel = true
config = files("${project.rootDir}/detekt/config.yml")
input = files(projectDir)
}
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ object Versions {
const val CORE_KTX = "1.2.0"
const val FRAGMENT_KTX = "1.2.4"
const val ANDROID_MAVEN = "2.1"
const val DETEKT_RUNTIME = "1.8.0"

const val COMPILE_SDK_VERSION = 28
const val MIN_SDK_VERSION = 21
Expand Down
Loading

0 comments on commit 38c719d

Please sign in to comment.