pxp9
LazyDoc - detect undocumented functions and pass the function to an AI provider to document it
Meet my trip building LazyDoc from scratch, exploring Elixir ASTs and combine it with a simple AI prompt you can generate fairly accurate documentation.
Lazy Doc is a project for those who are lazy to document their code. It is designed to detect undocumented functions and pass the function to an AI provider to document it.
Most Liked
dimitarvp
Interesting idea. For what it’s worth, I’d have the detection of undocumented functions as a separate library and then build yours on top of it.
pxp9
al2o3cr
Output seems reasonable overall. There’s a bug with functions that pattern-match their arguments without naming them, for instance filter_documented_functions. The bindings inside the first argument’s match become the documentation, and the second parameter is entirely ignored.
def filter_undocumented_functions(
{module, module_ast, _code_mod, functions},
{_mod, {_module_doc, function_docs}}
) do
filter_undocumented_functions(arg1, arg2)
Returns the filtered list of functions that are documented and visible.
Parameters
- module - the module from which functions are being filtered.
- module_ast - the abstract syntax tree of the module.
- _code_mod - additional code modifications.
- functions - the list of functions to be filtered.
pxp9
Just release version 0.5.4, which fixes all you said.







