Skip to content

UseDataClass flags the whole class body, not just the name #5338

@TWiStErRob

Description

@TWiStErRob

Steps to Reproduce

class Violation(
	val rule: String,
	val category: String?,
	val message: String
) {
	// 
}

Observed Behavior

image

Expected Behavior

Highlight only on class name or even the class keyword of it.
image

Context

Pretty much the same as #5316, but a different rule.

Your Environment

  • Version of detekt used: 1.21.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions