Repository navigation
Add a note about @sample in KDocs - #2171
Conversation
There was a problem hiding this comment.
Thanks for writing this down — just one broken reference to fix before merge.
Produced by Air Automations. Name: AI Review / Run: d89b972f
There was a problem hiding this comment.
Nice, useful guidance — just one link that needs sorting out before this can land. 🙂
Produced by Air Automations. Name: AI Review / Run: https://air.jetbrains.cloud/org/05cf1a7f-6ab5-713b-abd3-29d0c8a05e2d/automations/8daf2412-0b6c-4433-90c0-b40ab5aebcdb?run=df653dd4-791a-4382-8b33-798a080254e9
|
|
||
| Do not write examples as literal ` ```kotlin ` blocks in a KDoc. Write each example as a passing test in the | ||
| [`:samples`](samples) module and include it with the KoDEx | ||
| [`@sample`](KODEX_KDOC_PREPROCESSING.md#sample-and-samplenocomments-including-code-samples) notation. |
There was a problem hiding this comment.
important to note that you need to write the fully qualified name, because it's impossible to import from :samples inside other modules.
| @@ -327,8 +327,9 @@ only the code between these markers will be included in the KDoc. | |||
|
|
|||
| Gradle resolves `@sample` references into the `:samples` module, which is added as a contextual source, but the | |||
| IntelliJ KoDEx plugin does not: the IDE hover then shows a `SampleDocProcessor` error instead of the KDoc. | |||
There was a problem hiding this comment.
"error instead of the KDoc" is now fixed to "error where the sample would be", the rest of the kdoc is fine :)
No description provided.