lint/configured/kotlin
A linter is configured
Implements lint/configured for kotlin.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | kotlin |
| Scope | each |
| Kind | outcome |
| Source | library v0.5.0 |
| Selected by | fleetlint-recommended@v0.5.0 |
Requirement
The detekt 2 Gradle plugin (dev.detekt) is applied in the build (this build, a parent build or a convention plugin), so ./gradlew check runs it. Another analyzer is added with accept:.
Why
Kotlin’s compiler accepts swallowed exceptions; detekt is where they are caught.
Fix
Apply the detekt 2 Gradle plugin (id("dev.detekt"), any 2.x release from the Gradle plugin portal) with buildUponDefaultConfig and config/detekt/detekt.yml, in a convention plugin when the build has several modules; fleetlint fix --apply writes the configuration, the plugin is added by hand. detekt 1.23 is built on Kotlin 2.0 and fails on JDK 25.
Agent instruction: Apply the detekt 2 Gradle plugin (id dev.detekt, the latest 2.x from the Gradle plugin portal) with buildUponDefaultConfig = true and config.setFrom(rootProject.file(“config/detekt/detekt.yml”)); in a multi-module build apply it from the convention plugin every module uses. Write config/detekt/detekt.yml from the template; fix the findings instead of adding a baseline entry.
fleetlint fix can apply this rule’s fix automatically (1 action(s)).
A finding of this rule points at config/detekt/detekt.yml.
Sources
- https://csrc.nist.gov/pubs/sp/800/218/final (standard, PW.7.2: Perform the code review and/or code analysis based on the organization’s secure coding standards)
- https://fleetlint.org/baseline/#static-analysis (convention)
- https://detekt.dev/docs/gettingstarted/gradle/ (spec)
- https://fleetlint.org/stacks/#kotlin-jvm–android
Generated by fleetlint docs from catalog v0.5.0.