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\PublicEnum.kt:21:15: PublicEnum is missing required documentation. [UndocumentedPublicClass]
Expected Behavior
Findings for each of the undocumented enum constants. They're public API as well, accessible as PublicEnum.Foo.
If
public companion object {
public val Foo: PublicClass = ...
}
needs to be documented (The property Foo is missing documentation. [UndocumentedPublicProperty]), so does these enum constants Foo and Bar as they're essentially "just syntactic a shorthand" for the same.
Context
I'm relying on detekt to ensure that all my public API surface is documented.
This repro might be a trivial case, but imagine an enum with 10-12 values, and no documentation.
Steps to Reproduce
Configuration:
Observed Behavior
Expected Behavior
Findings for each of the undocumented enum constants. They're public API as well, accessible as
PublicEnum.Foo
. Ifneeds to be documented (
The property Foo is missing documentation. [UndocumentedPublicProperty]
), so does these enum constantsFoo
andBar
as they're essentially "just syntactic a shorthand" for the same.Context
I'm relying on detekt to ensure that all my public API surface is documented.
This repro might be a trivial case, but imagine an enum with 10-12 values, and no documentation.
Your Environment
--scan
option when running the gradle task): N/A