Skip to content

Regression: 1.23.7 - UndocumentedPublicClass flags unnamed public companion object #7634

@Nava2

Description

@Nava2

Expected Behavior

UndocumentedPublicClass is configurable to flag unnamed companion object.

Observed Behavior

UndocumentedPublicClass flags companion object newly in 1.23.7

Steps to Reproduce

/** Some doc **/
public class Foo {
  public companion object // Flagged
}

Context

In #7219, this behaviour was enabled. The rule is written/described such that this is expected. However, this was a breaking change as it caused significant amount of violations within our code base.

Your Environment

  • Version of detekt used: 1.23.7
  • Version of Gradle used (if applicable): 8.10
  • Operating System and version: macos

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions