fleetlint Policy for a fleet of repositories
v0.8
Getting started

lint/configured/kotlin

A linter is configured

Implements lint/configured for kotlin.

Severitywarning
Tiers1, 2
Stackskotlin
Scopeeach
Kindoutcome
Sourcelibrary v0.5.0
Selected byfleetlint-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


Generated by fleetlint docs from catalog v0.5.0.