Added detekt plugin.
This commit is contained in:
parent
1f0d84896a
commit
969768ff73
2 changed files with 25 additions and 2 deletions
|
@ -18,6 +18,7 @@ plugins {
|
||||||
id("com.jfrog.bintray") version "1.8.3"
|
id("com.jfrog.bintray") version "1.8.3"
|
||||||
id("org.jetbrains.dokka") version "0.9.17"
|
id("org.jetbrains.dokka") version "0.9.17"
|
||||||
id("org.jlleitschuh.gradle.ktlint") version "4.1.0"
|
id("org.jlleitschuh.gradle.ktlint") version "4.1.0"
|
||||||
|
id("io.gitlab.arturbosch.detekt") version "1.0.0.RC7"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "net.thauvin.erik"
|
group = "net.thauvin.erik"
|
||||||
|
@ -53,8 +54,19 @@ dependencies {
|
||||||
testCompile("org.testng:testng:6.14.3")
|
testCompile("org.testng:testng:6.14.3")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
detekt {
|
||||||
|
profile("main", Action {
|
||||||
|
//config = "default-detekt-config.yml"
|
||||||
|
input = "src/main/kotlin"
|
||||||
|
filters = ".*/resources/.*,.*/build/.*"
|
||||||
|
output = "$buildDir/reports/detekt-reports"
|
||||||
|
outputName = "detekt-report"
|
||||||
|
baseline = "detekt-baseline.xml"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
withType(Test::class.java).all {
|
withType<Test> {
|
||||||
useTestNG()
|
useTestNG()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,4 +230,4 @@ tasks {
|
||||||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||||
dependsOn("wrapper", bintrayUpload)
|
dependsOn("wrapper", bintrayUpload)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
11
detekt-baseline.xml
Normal file
11
detekt-baseline.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<SmellBaseline>
|
||||||
|
<Blacklist timestamp="1531308331780"></Blacklist>
|
||||||
|
<Whitelist timestamp="1531311383595">
|
||||||
|
<ID>ComplexMethod:PinboardPoster.kt$PinboardPoster$private fun executeMethod(method: String, params: List<Pair<String, String>>): Boolean</ID>
|
||||||
|
<ID>LongParameterList:PinboardPoster.kt$PinboardPoster$( url: String, description: String, extended: String = "", tags: String = "", dt: String = "", replace: Boolean = true, shared: Boolean = true, toRead: Boolean = false )</ID>
|
||||||
|
<ID>MaxLineLength:PinboardPoster.kt$PinboardPoster$val code = document.getElementsByTagName("result")?.item(0)?.attributes?.getNamedItem("code")?.nodeValue</ID>
|
||||||
|
<ID>NestedBlockDepth:PinboardPoster.kt$PinboardPoster$private fun executeMethod(method: String, params: List<Pair<String, String>>): Boolean</ID>
|
||||||
|
<ID>TooGenericExceptionCaught:PinboardPoster.kt$PinboardPoster$e: Exception</ID>
|
||||||
|
</Whitelist>
|
||||||
|
</SmellBaseline>
|
Loading…
Add table
Add a link
Reference in a new issue