toolisticon / toolisticon/kotlin-code-generation

Avoid duplicate kdoc for constructor parameters

Open
#26 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Prio: COULD Type: enhancement
Dominant language
Kotlin
Stars
2
Forks
0
Avg merge
3h 12m
Merged PRs (30d)
5

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the code that generates KDoc for constructor parameters and inspect how @param entries and property declarations are both documented. The issue is done when duplicate entries are removed and the @param documentation is retained; an optional configuration property or processor argument is a separate extension.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
documentation, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.