Skip to content

Commit ddb51d9

Browse files
authored
chore(deps): bump detekt (#11167)
2 parents 740da0b + a719a58 commit ddb51d9

55 files changed

Lines changed: 767 additions & 782 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app-ui-catalog/detekt-baseline.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" ?>
2+
<SmellBaseline>
3+
<ManuallySuppressedIssues/>
4+
<CurrentIssues>
5+
<ID>ModifierNotUsedAtRoot:IconItems.kt:modifier = modifier</ID>
6+
<ID>ParameterNaming:CatalogContent.kt:onThemeChanged: () -&gt; Unit</ID>
7+
<ID>ParameterNaming:CatalogContent.kt:onThemeVariantChanged: () -&gt; Unit</ID>
8+
<ID>ParameterNaming:DrawerContent.kt:onThemeChanged: () -&gt; Unit</ID>
9+
<ID>ParameterNaming:DrawerContent.kt:onThemeVariantChanged: () -&gt; Unit</ID>
10+
</CurrentIssues>
11+
</SmellBaseline>

backend/api/detekt-baseline.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" ?>
2+
<SmellBaseline>
3+
<ManuallySuppressedIssues/>
4+
<CurrentIssues>
5+
<ID>ForbiddenComment:BackendFolder.kt:BackendFolder$// FIXME: add documentation</ID>
6+
<ID>TooManyFunctions:Backend.kt:Backend</ID>
7+
<ID>TooManyFunctions:BackendFolder.kt:BackendFolder</ID>
8+
<ID>TooManyFunctions:SyncListener.kt:SyncListener</ID>
9+
</CurrentIssues>
10+
</SmellBaseline>

backend/demo/detekt-baseline.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" ?>
2+
<SmellBaseline>
3+
<ManuallySuppressedIssues/>
4+
<CurrentIssues>
5+
<ID>TooManyFunctions:DemoBackend.kt:DemoBackend : Backend</ID>
6+
</CurrentIssues>
7+
</SmellBaseline>

backend/imap/detekt-baseline.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" ?>
2+
<SmellBaseline>
3+
<ManuallySuppressedIssues/>
4+
<CurrentIssues>
5+
<ID>CyclomaticComplexMethod:ImapSync.kt:ImapSync$private fun synchronizeMailboxSynchronous</ID>
6+
<ID>LongMethod:ImapSync.kt:ImapSync$private fun downloadMessages</ID>
7+
<ID>LongMethod:ImapSync.kt:ImapSync$private fun synchronizeMailboxSynchronous</ID>
8+
<ID>MagicNumber:ImapBackendPusher.kt:ImapBackendPusher$1000L</ID>
9+
<ID>MagicNumber:ImapBackendPusher.kt:ImapBackendPusher$15</ID>
10+
<ID>MagicNumber:ImapBackendPusher.kt:ImapBackendPusher$60</ID>
11+
<ID>MaxLineLength:ImapSync.kt:ImapSync.&lt;no name provided&gt;$// TODO: This might be the source of poll count errors in the UI. Is todo always the same as ofTotal</ID>
12+
<ID>ReturnCount:ImapSync.kt:ImapSync$private fun isOldMessage: Boolean</ID>
13+
<ID>ReturnCount:ImapSync.kt:ImapSync$private fun syncFlags: Boolean</ID>
14+
<ID>ReturnCount:UidReverseComparator.kt:UidReverseComparator$override fun compare: Int</ID>
15+
<ID>TooGenericExceptionCaught:ImapFolderPusher.kt:ImapFolderPusher$e: Exception</ID>
16+
<ID>TooGenericExceptionCaught:ImapSync.kt:ImapSync$e: Exception</ID>
17+
<ID>TooGenericExceptionCaught:ImapSync.kt:ImapSync.&lt;no name provided&gt;$e: Exception</ID>
18+
<ID>TooGenericExceptionThrown:ImapSync.kt:ImapSync$throw Exception("Message count $remoteMessageCount for folder $folder")</ID>
19+
<ID>TooManyFunctions:ImapBackend.kt:ImapBackend : Backend</ID>
20+
<ID>TooManyFunctions:ImapBackendPusher.kt:ImapBackendPusher : BackendPusherImapPusherCallback</ID>
21+
<ID>TooManyFunctions:ImapSync.kt:ImapSync</ID>
22+
<ID>TooManyFunctions:SimpleSyncListener.kt:SimpleSyncListener : SyncListener</ID>
23+
</CurrentIssues>
24+
</SmellBaseline>

backend/jmap/detekt-baseline.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" ?>
2+
<SmellBaseline>
3+
<ManuallySuppressedIssues/>
4+
<CurrentIssues>
5+
<ID>ForbiddenComment:CommandSync.kt:CommandSync$// FIXME: Add sort parameter</ID>
6+
<ID>ReturnCount:JmapAccountDiscovery.kt:JmapAccountDiscovery$fun discover: JmapDiscoveryResult</ID>
7+
<ID>SwallowedException:JmapAccountDiscovery.kt:JmapAccountDiscovery$e: EndpointNotFoundException</ID>
8+
<ID>SwallowedException:JmapAccountDiscovery.kt:JmapAccountDiscovery$e: UnauthorizedException</ID>
9+
<ID>SwallowedException:JmapAccountDiscovery.kt:JmapAccountDiscovery$e: UnknownHostException</ID>
10+
<ID>TooGenericExceptionCaught:CommandSync.kt:CommandSync$e: Exception</ID>
11+
<ID>TooGenericExceptionCaught:JmapAccountDiscovery.kt:JmapAccountDiscovery$e: Exception</ID>
12+
<ID>TooManyFunctions:CommandSync.kt:CommandSync</ID>
13+
<ID>TooManyFunctions:JmapBackend.kt:JmapBackend : Backend</ID>
14+
</CurrentIssues>
15+
</SmellBaseline>

backend/pop3/detekt-baseline.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" ?>
2+
<SmellBaseline>
3+
<ManuallySuppressedIssues/>
4+
<CurrentIssues>
5+
<ID>TooManyFunctions:Pop3Backend.kt:Pop3Backend : Backend</ID>
6+
</CurrentIssues>
7+
</SmellBaseline>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" ?>
2+
<SmellBaseline>
3+
<ManuallySuppressedIssues/>
4+
<CurrentIssues>
5+
<ID>MagicNumber:InMemoryBackendFolder.kt:InMemoryBackendFolder$25</ID>
6+
<ID>TooManyFunctions:InMemoryBackendFolder.kt:InMemoryBackendFolder : BackendFolder</ID>
7+
</CurrentIssues>
8+
</SmellBaseline>

build-plugin/plugin/src/main/kotlin/net/thunderbird/gradle/plugin/quality/detekt/DetektPlugin.kt

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package net.thunderbird.gradle.plugin.quality.detekt
22

3-
import io.gitlab.arturbosch.detekt.Detekt
4-
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
5-
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
3+
import dev.detekt.gradle.Detekt
4+
import dev.detekt.gradle.DetektCreateBaselineTask
5+
import dev.detekt.gradle.extensions.DetektExtension
66
import net.thunderbird.gradle.plugin.ProjectConfig
77
import net.thunderbird.gradle.plugin.libs
88
import org.gradle.api.Plugin
99
import org.gradle.api.Project
10+
import org.gradle.kotlin.dsl.assign
1011
import org.gradle.kotlin.dsl.dependencies
1112
import org.gradle.kotlin.dsl.withType
1213

@@ -18,7 +19,7 @@ import org.gradle.kotlin.dsl.withType
1819
class DetektPlugin : Plugin<Project> {
1920
override fun apply(target: Project) {
2021
with(target) {
21-
pluginManager.apply("io.gitlab.arturbosch.detekt")
22+
pluginManager.apply("dev.detekt")
2223

2324
// Access libs extension lazily since it might not be available yet when the plugin is applied
2425
// (especially in precompiled script plugins). Could be removed once all precompiled script plugins
@@ -29,12 +30,8 @@ class DetektPlugin : Plugin<Project> {
2930
}
3031
}
3132

32-
if (this == rootProject) {
33-
configureRootDetektTasks()
34-
} else {
35-
configureDetekt()
36-
configureDetektTasks()
37-
}
33+
configureDetekt()
34+
configureDetektTasks()
3835
}
3936
}
4037

@@ -43,10 +40,6 @@ class DetektPlugin : Plugin<Project> {
4340
extensions.configure<DetektExtension>("detekt") {
4441
config.setFrom(isolated.rootProject.projectDirectory.file("config/detekt/detekt.yml").asFile)
4542

46-
val name = project.path.replace(":", "-").replace("/", "-")
47-
baseline = isolated.rootProject.projectDirectory
48-
.file("config/detekt/detekt-baseline$name.xml").asFile
49-
5043
ignoredBuildTypes = listOf("release")
5144
}
5245
}
@@ -63,9 +56,10 @@ class DetektPlugin : Plugin<Project> {
6356
exclude(defaultExcludes)
6457

6558
reports {
66-
html.required.set(true)
59+
checkstyle.required.set(false)
60+
html.required.set(false)
6761
sarif.required.set(true)
68-
xml.required.set(true)
62+
markdown.required.set(true)
6963
}
7064

7165
tasks.getByName("build").dependsOn(this)
@@ -89,19 +83,6 @@ class DetektPlugin : Plugin<Project> {
8983
}
9084
}
9185
}
92-
93-
private fun Project.configureRootDetektTasks() {
94-
with(tasks) {
95-
register("detektAll") {
96-
group = "verification"
97-
description = "Runs detekt on the whole project"
98-
99-
allprojects {
100-
this@register.dependsOn(tasks.withType<Detekt>())
101-
}
102-
}
103-
}
104-
}
10586
}
10687

10788
private val defaultExcludes = listOf(

config/detekt/detekt-baseline-backend-api.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

config/detekt/detekt-baseline-backend-demo.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)