ldoc
ldoc copied to clipboard
Docs for undocumented functions
We're iteratively documenting our Katamari:
https://github.com/lua-nucleo/lua-nucleo/
As you can see, there is a lot of empty pages in the documentation.
We'd like to see at least list of names of undocumented functions that a module exports. Is it possible? (Probably shouldn't be on by default, should be an option in LDoc config.)
We'd like to see at least list of names of undocumented functions that a module exports. Is it possible? (Probably shouldn't be on by default, should be an option in LDoc config.)
The obvious way would be to teach LDoc to look for the return {...} at the end of each module and report any exported function that does not have corresponding documentation. Your coding style makes this relatively easy; usually LDoc is only interested in code following a doc comment, but having the exports at the end is do-able!
Let me have a look at how this could be integrated with the rest!
(I've been playing with the idea of going beyond lexical analysis and actually building up an AST using the metalua parser, but that's a longer-term goal)
Any luck?
BTW, note that it is probably not that hard to inspect all globals too in case if module() is used.
See https://github.com/lua-aplicado/lua-aplicado/blob/master/lua-aplicado/chunk_inspector.lua (tell me if you'd like to see that a separate module... and/or contribute 5.2 support).
Up.
Contributions welcome. I don't have a lot of time to develop this myself but am trying to keep up with facilitating PRs.