Expected Behavior
When enum constants used in annotation attributes the enum import should not marked as unused.
Steps to Reproduce
In such code BatchFetch import statement marked as unused:
...
import org.eclipse.persistence.annotations.FetchType
...
@Entity
class Sale(
@Id
val id: Long,
@ManyToOne(fetch = FetchType.LAZY, optional = false)
var client: Client,
...
)
Context
We use Gradle plugin with type resolution mode (detektMain task). Bug is introduced after 1.12.0 (witch works as expected).
Your Environment
- Version of detekt used: 1.14.1
- Version of Gradle used (if applicable): 6.6.1
- Operating System and version: MacOS 10.15.7
Expected Behavior
When enum constants used in annotation attributes the enum import should not marked as unused.
Steps to Reproduce
In such code
BatchFetchimport statement marked as unused:Context
We use Gradle plugin with type resolution mode (detektMain task). Bug is introduced after 1.12.0 (witch works as expected).
Your Environment