Skip to content

UseDataClass: False positive with expected class #7832

@realdadfish

Description

@realdadfish

This class

expect class OAuthClientSettings() {
    val environment: Environment
    internal val authFlowFactory: CodeAuthFlowFactory
    internal val store: SettingsStore
}

triggers the following warning:

OAuthClientSettings.kt:9:14: The class OAuthClientSettings defines no functionality and only holds data. Consider converting it to a data class. [UseDataClass]

However, it is prohibited to create "expected" data classes:

Modifier 'expect' is incompatible with 'data'

Your Environment

  • Version of detekt used: 1.23.7
  • Version of Gradle used (if applicable): 8.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issueIssue that is easy to pickup for people that are new to the projecthelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions