What’s New

detekt v2.0.0-alpha.4

v2.0.0-alpha.4Pre-release
Added 2
  • Support Kotlin 2.4.0
  • Add new rule LeakingSessionBoundType
Changed 9
  • Apply the indent_style configuration to all the ktlint wrapper rules
  • Expose Glob-to-Regex functions in psi-utils
  • Make Detektion immutable
  • Include ktlint-repackage in ktlint-wrapper JAR
  • Declare DGP compatibility with Gradle's configuration cache
  • Forward languageVersionSettings to KotlinAnalysisApiEngine.compile
Fixed 6
  • Prevent ArrayPrimitive crash on unresolved types
  • Fix PrintStackTrace nested call detection
  • Fix unused import false positive for companion object member extension properties
  • Accept punctuation after a link
  • Fix UnnecessaryFullyQualifiedName false positive with explicit import shadowing
  • Fix UnnecessaryFullyQualifiedName clashes with kotlin package name
Removed 3
  • Stop publishing ktlint-repackage
  • Stop exposing ktlint's StandardRule to detekt-rules-ktlint-wrapper consumers
  • Remove excludeImportStatements from Deprecation rule
2.0.0-alpha.4 - 2026-06-13

This is an alpha release of Detekt 2.0.0. Is built against Kotlin 2.4.0, Gradle 9.5.1, AGP 9.2.1 and is tested against JDK 25.

Notable Changes
  • Support Kotlin 2.4.0 - #9218
  • Add new rule LeakingSessionBoundType - #9242
  • Apply the indent_style configuration to all the ktlint wrapper rules (previsouly this was applied only to the Indentation rule) - #9315
Breaking Changes
  • Expose Glob-to-Regex functions in psi-utils - #9340
  • Make Detektion immutable - #8583
Changelog
  • fix: prevent ArrayPrimitive crash on unresolved types - #9364
  • Update ktlint documentation links - #9354
  • Fix PrintStackTrace nested call detection - #9352
  • Fix unused import false positive for companion object member extension properties - #9349
  • Accept punctuation after a link - #9341
  • Fixes UnnecessaryFullyQualifiedName false positive with explicit import shadowing - #9329
  • docs: fix KMP type resolution task names - #9316
  • Stop publishing ktlint-repackage - #9314
  • Stop exposing ktlint's StandardRule to detekt-rules-ktlint-wrapper consumers - #9313
  • Include ktlint-repackage in ktlint-wrapper JAR - #9312
  • Declare DGP compatibility with Gradle's configuration cache - #9311
  • Forward languageVersionSettings to KotlinAnalysisApiEngine.compile - #9305
  • docs: add ForbiddenImport configuration example - #9302
  • Fix UnnecessaryFullyQualifiedName clashes with kotlin package name - #9289
  • Remove excludeImportStatements from Deprecation rule - #9287
  • Improve repackaging of Analysis API dependencies - #9285
  • MaxChainedCallsOnSameLine - Fix AA type leaks - #9261
  • SuspendFunSwallowedCancellation - Fix AA type leaks - #9256
  • feat: Add exhaustive option to OutdatedDocumentation rule, also improve error messages - #9255
  • Excluding generated sources by default - #9251
  • Move FileProcessListenerExtensions to :detekt-test - #9212
  • Improve SuspendFunSwallowedCancellation - #9208
  • Cli filters - #9200
  • Allow single-argument Boolean generics in NonBooleanPropertyPrefixedWithIs - #9173
  • Remove Config.parentPath - #9036
Dependency Updates
  • Update Poko to v0.23.1 - #9371
  • Update slf4j monorepo to v2.0.18 - #9324
  • Update agp to v9.2.1 - #9268
Housekeeping & Refactorings
  • Update test to avoid typealias to compiler-required annotation - #9361
  • Remove unnecessary compileOnly dependencies - #9318
Contributors

We would like to thank the following contributors that made this release possible: @3flex, @BraisGabin, @ChristophyBarth, @FletchMcKee, @Lucas-FManager, @ShubhamWorks02, @Will-thom, @e5l, @fru1tworld, @jonapoul, @luanpotter, @matejdro, @mirkoalicastro, @nchen000, @ninebolt6, @paulkagiri, @travisMiehm

View original

Discussion