mirror of
https://github.com/jlengrand/detekt.git
synced 2026-03-10 08:11:23 +00:00
Self-inspect the detekt-gradle-plugin (#4765)
This commit is contained in:
@@ -7,6 +7,8 @@ plugins {
|
||||
`java-test-fixtures`
|
||||
idea
|
||||
alias(libs.plugins.pluginPublishing)
|
||||
// We use this published version of the Detekt plugin to self analyse this project.
|
||||
id("io.gitlab.arturbosch.detekt") version "1.20.0"
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -17,6 +19,13 @@ repositories {
|
||||
group = "io.gitlab.arturbosch.detekt"
|
||||
version = Versions.currentOrSnapshot()
|
||||
|
||||
detekt {
|
||||
source.from("src/functionalTest/kotlin")
|
||||
buildUponDefaultConfig = true
|
||||
baseline = file("config/gradle-plugin-baseline.xml")
|
||||
config = files("config/gradle-plugin-detekt.yml")
|
||||
}
|
||||
|
||||
testing {
|
||||
suites {
|
||||
getByName("test", JvmTestSuite::class) {
|
||||
@@ -70,6 +79,9 @@ dependencies {
|
||||
|
||||
pluginCompileOnly(libs.android.gradle)
|
||||
pluginCompileOnly(libs.kotlin.gradle)
|
||||
|
||||
// We use this published version of the detekt-formatting to self analyse this project.
|
||||
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.20.0")
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
|
||||
6
detekt-gradle-plugin/config/gradle-plugin-baseline.xml
Normal file
6
detekt-gradle-plugin/config/gradle-plugin-baseline.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues/>
|
||||
<CurrentIssues>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
||||
35
detekt-gradle-plugin/config/gradle-plugin-detekt.yml
Normal file
35
detekt-gradle-plugin/config/gradle-plugin-detekt.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
complexity:
|
||||
TooManyFunctions:
|
||||
excludes: ["**/test/**", "**/functionalTest/**"]
|
||||
|
||||
naming:
|
||||
ClassNaming:
|
||||
excludes: ["**/*Spec.kt"]
|
||||
FunctionNaming:
|
||||
active: true
|
||||
excludes:
|
||||
- "**/test/**"
|
||||
- "**/androidTest/**"
|
||||
- "**/commonTest/**"
|
||||
- "**/functionalTest/**"
|
||||
- "**/jvmTest/**"
|
||||
- "**/jsTest/**"
|
||||
- "**/iosTest/**"
|
||||
|
||||
performance:
|
||||
SpreadOperator:
|
||||
excludes: ["**/test/**", "**/functionalTest/**"]
|
||||
|
||||
style:
|
||||
MagicNumber:
|
||||
active: true
|
||||
excludes: ["**/test/**", "**/*Test.kt", "**/*Spec.kt"]
|
||||
MaxLineLength:
|
||||
active: true
|
||||
excludes: ["**/test/**", "**/*Test.kt", "**/*Spec.kt"]
|
||||
excludeCommentStatements: true
|
||||
|
||||
formatting:
|
||||
active: true
|
||||
MaximumLineLength:
|
||||
active: false
|
||||
Reference in New Issue
Block a user