Skip to content

ClassOrdering only reports first misorder, not all misorders #3141

@hbmartin

Description

@hbmartin

Expected Behavior

ClassOrdering should report all misorderings in a class

Observed Behavior

ClassOrdering only reports the first misordering in a class

Steps to Reproduce

This can be easily observed by changing a test in ClassOrderingSpec to have multiple misorders, but still pass the assertions that the list of findings only has 1 item.

Context

As a user, I expect that fixing all errors from running detekt will result in the next run succeeding. This may not be the case now, as fixing a ClassOrdering violation may reveal further violations in a subsequent run.

Your Environment

  • Version of detekt used:
  • Version of Gradle used (if applicable):
  • Operating System and version:
  • Link to your project (if it's a public repository):

@BraisGabin please assign to me

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions