is there any way to fail a build if example code i...
# dokka
c
is there any way to fail a build if example code in the docstring fails to build or fails an assertion? love this feature from
cargo doc
j
Maybe knit?
👀 1
c
hmm. have you used this or know anything about the roadmap?
j
Coroutines uses it
💯 1
c
good enough for me 👍
i
(knit started out more as an internal tool that resolves specific problems tbh, so beware - it might stay in the experimental stage for quite some time)
👍 1
Just as with anything in Dokka, I'm pretty sure you can write a Dokka plugin for that 🙂 You can easily extract codeblocks from KDocs in Dokka, so you only have to find a way to validate/run it. If you're using
@sample
, it's becomes significantly more difficult to deal with, but is also doable It'd be awesome if you could submit a feature request to Dokka's issue tracker on GitHub, maybe one day it'll be implemented natively or as a separate plugin
💯 1
c