You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a Kotlin project that includes several enum classes. There is a single source file astronomy.kt that contains all the code and documentation comments. I am using Dokka to generate "GitHub Flavored Markdown" (gfm). When Dokka encounters an enum declaration like this...
/** * Aberration calculation options. * * [Aberration](https://en.wikipedia.org/wiki/Aberration_of_light) is an effect * causing the apparent direction of an observed body to be shifted due to transverse * movement of the Earth with respect to the rays of light coming from that body. * This angular correction can be anywhere from 0 to about 20 arcseconds, * depending on the position of the observed body relative to the instantaneous * velocity vector of the Earth. * * Some Astronomy Engine functions allow optional correction for aberration by * passing in a value of this enumerated type. * * Aberration correction is useful to improve accuracy of coordinates of * apparent locations of bodies seen from the Earth. * However, because aberration affects not only the observed body (such as a planet) * but the surrounding stars, aberration may be unhelpful (for example) * for determining exactly when a planet crosses from one constellation to another.*/enumclassAberration {
/** * Request correction for aberration.*/Corrected,
/** * Do not correct for aberration.*/None,
}
... it generates an incorrect and unwanted "Properties" section that contains name and ordinal properties that link to the wrong enum class, as shown in the following example. They are linked to NodeEventKind.Ascending, which does exist in my code, but is a member of an unrelated enum class.
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Aberration](index.md)# Aberration[jvm]\
enum [Aberration](index.md) : [Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)<[Aberration](index.md)>
Aberration calculation options.
[Aberration](https://en.wikipedia.org/wiki/Aberration_of_light) is an effect causing the apparent direction of an observed body to be shifted due to transverse movement of the Earth with respect to the rays of light coming from that body. This angular correction can be anywhere from 0 to about 20 arcseconds, depending on the position of the observed body relative to the instantaneous velocity vector of the Earth.
Some Astronomy Engine functions allow optional correction for aberration by passing in a value of this enumerated type.
Aberration correction is useful to improve accuracy of coordinates of apparent locations of bodies seen from the Earth. However, because aberration affects not only the observed body (such as a planet) but the surrounding stars, aberration may be unhelpful (for example) for determining exactly when a planet crosses from one constellation to another.
## Entries||||---|---||[None](-none/index.md)|[jvm]<br>[None](-none/index.md)()<br>Do not correct for aberration. ||[Corrected](-corrected/index.md)|[jvm]<br>[Corrected](-corrected/index.md)()<br>Request correction for aberration. |## Properties| Name | Summary ||---|---||[name](../-node-event-kind/-ascending/index.md#-372974862%2FProperties%2F-1216412040)|[jvm]<br>val [name](../-node-event-kind/-ascending/index.md#-372974862%2FProperties%2F-1216412040): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)||[ordinal](../-node-event-kind/-ascending/index.md#-739389684%2FProperties%2F-1216412040)|[jvm]<br>val [ordinal](../-node-event-kind/-ascending/index.md#-739389684%2FProperties%2F-1216412040): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)|
Expected behaviour
Either of the following:
Do not generate the Properties section containing name and ordinal. (My personal preference.) They are not useful because they are a generic part of any enum class; they do not help people trying to understand my code.
If they must be generated, link to the correct class. In this example, the link should be to Aberration, not the unrelated enum class NodeEventKind.
Screenshots
N/A
To Reproduce
Clone the Astronomy Engine repository and change into its directory.
git checkout kotlin
cd source/kotlin
./gradlew dokkaGfm
Look at the file source/kotlin/build/dokka/gfm/astronomy/io.github.cosinekitty.astronomy/-aberration/index.md. It will contain incorrect links to NodeEventKind, as described above.
Dokka configuration
Configuration of dokka used to reproduce the bug:
cosinekitty
changed the title
Enum class members name and ordinal link to the wrong class.
Enum class properties name and ordinal link to the wrong class.
Apr 25, 2022
Describe the bug
I have a Kotlin project that includes several enum classes. There is a single source file
astronomy.kt
that contains all the code and documentation comments. I am using Dokka to generate "GitHub Flavored Markdown" (gfm). When Dokka encounters an enum declaration like this...... it generates an incorrect and unwanted "Properties" section that contains
name
andordinal
properties that link to the wrong enum class, as shown in the following example. They are linked toNodeEventKind.Ascending
, which does exist in my code, but is a member of an unrelated enum class.Expected behaviour
Either of the following:
Properties
section containingname
andordinal
. (My personal preference.) They are not useful because they are a generic part of any enum class; they do not help people trying to understand my code.Aberration
, not the unrelated enum classNodeEventKind
.Screenshots
N/A
To Reproduce
git checkout kotlin
cd source/kotlin
./gradlew dokkaGfm
source/kotlin/build/dokka/gfm/astronomy/io.github.cosinekitty.astronomy/-aberration/index.md
. It will contain incorrect links toNodeEventKind
, as described above.Dokka configuration
Configuration of dokka used to reproduce the bug:
Installation
Additional context
Are you willing to provide a PR?
I am happy to provide whatever help the maintainers could use to reproduce/diagnose this bug. Thank you!
The text was updated successfully, but these errors were encountered: