carp-dk / carp-dk/detekt-verify-implementation
Should interface types used in immutable classes also need to be immutable?
- Dominant language
- Kotlin
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
It [was pointed out to me that](https://github.com/detekt/detekt/issues/2870#issuecomment-659042444):
> What happen if the type of a property is an interface?
When an abstract or interface type is used as a property in an immutable class, the extending classes might still contain mutable properties.
Therefore, we should likely require such types to also have the immutable annotation applied. Or, is this not a problem?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the linked detekt discussion and the plugin's existing handling of immutable annotations. Determine whether interface-typed properties can expose mutable implementations, then define the expected rule and acceptance cases before identifying the implementation and test locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100