Tags: mvanhorn/detekt
Tags
fix(UnusedImport): detect named companion objects correctly (detekt#9005 ) * fix(UnusedImport): detect named companion objects correctly Previously, the rule only recognized companion objects with the default name "Companion" when determining if a class reference is used. This caused false positives when referencing classes with named companion objects (e.g., `CoroutineDispatcher` which has `companion object Key`). The fix uses `classKind == KaClassKind.COMPANION_OBJECT` to properly detect all companion objects regardless of their name. Fixes detekt#8989 * refactor(UnusedImport): simplify companion object detection Use a when expression instead of intermediate variables. --------- Co-authored-by: Claude <noreply@anthropic.com>
`Detektion` is a `class` now instead of an `interface` (detekt#8580) * Improve code * Detektion class
PreviousNext