ldoc icon indicating copy to clipboard operation
ldoc copied to clipboard

Docs for undocumented functions

Open agladysh opened this issue 13 years ago • 5 comments

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.)

agladysh avatar Oct 16 '12 08:10 agladysh

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)

stevedonovan avatar Oct 16 '12 08:10 stevedonovan

Any luck?

agladysh avatar Dec 17 '12 15:12 agladysh

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).

agladysh avatar Dec 19 '12 09:12 agladysh

Up.

agladysh avatar Aug 20 '13 05:08 agladysh

Contributions welcome. I don't have a lot of time to develop this myself but am trying to keep up with facilitating PRs.

alerque avatar May 03 '23 07:05 alerque