public object PublicObject
public class PublicClass {
public companion object;
}
Configuration:
detekt.allRules = true
// Does not contain relevant lines, just a few rules deactivated or fine tuned.
detekt.config.from(rootProject.file("config/detekt/detekt.yml"))
dependencies { detektPlugins(libs.detekt.rules.libraries) }
Observed Behavior
src\main\kotlin\com\example\PublicTest.kt:21:15: PublicObject is missing required documentation. [UndocumentedPublicClass]
src\main\kotlin\com\example\PublicTest.kt:23:14: PublicClass is missing required documentation. [UndocumentedPublicClass]
Expected Behavior
The 2 findings are fine, but there are 3 public classes in the above code:
PublicObject
PublicClass
PublicClass.Companion
So the false negative is the companion object.
Context
I'm relying on detekt to ensure that all my public API surface is documented.
Steps to Reproduce
Configuration:
Observed Behavior
Expected Behavior
The 2 findings are fine, but there are 3 public classes in the above code:
PublicObject
PublicClass
PublicClass.Companion
So the false negative is the companion object.
Context
I'm relying on detekt to ensure that all my public API surface is documented.
Your Environment
--scan
option when running the gradle task): N/A