Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The location of KDoc in the code is not specified well #3569

Open
vmishenev opened this issue Apr 17, 2024 · 0 comments
Open

The location of KDoc in the code is not specified well #3569

vmishenev opened this issue Apr 17, 2024 · 0 comments
Labels
kdoc-spec An issue that requires clarification from the KDoc spec's perspective

Comments

@vmishenev
Copy link
Member

vmishenev commented Apr 17, 2024

class Foo(
  /**
   * This is a bar property
   */
  val bar: String
)

or the example from Dokka's codebase


This case works for the Dokka and IDE.

Also, it works for a value parameter in a primary constructor.
image

There is the more weird case (working in the Dokka and IDE):

class /**This is a class*/ Foo (
     p: /**This is a param*/ Int
)

From the current KDoc documentation for @property

This tag can be used for documenting properties declared in the primary constructor, where putting a doc comment directly before the property definition would be awkward.

Maybe, to resolve this issue, we need to have a style guide like Javadoc's one.

@vmishenev vmishenev added the kdoc-spec An issue that requires clarification from the KDoc spec's perspective label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kdoc-spec An issue that requires clarification from the KDoc spec's perspective
Projects
None yet
Development

No branches or pull requests

1 participant