toolisticon / kotlin-code-generation

Opinionated setup for kotlin-poet code generator projects
Apache License 2.0
2 stars 0 forks source link

Avoid duplicate kdoc for constructor parameters #26

Open jangalinski opened 3 weeks ago

jangalinski commented 3 weeks ago

When adding kdoc to constructor parameters, we get duplicate entries. The doc is written to the @param section ond to the property declaration:


/**
 * This is the data class documentation.
 *
 * @param x the x parameter
 * @param y the y parameter
 */
public data class Foo(
  /**
   * the x parameter
   */
  public val x: Int,
  /**
   * the y parameter
   */
  private val y: Long,
)

Goal: only keep the @param docs. Optional: make configurable via properties or pass to processor