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.
Last Post!
pxp9
@syepes As far as I know, In every Elixir app and library you can create
config/config.exs and config/runtime.exs files. Then just copy paste and modify as you wish what it is in the README.
Is there any reason you wont like to create this files ?
There is no other way to configure the library because the library calls the Application.get_env/3 to get the configuration it needs. Most of the config have nice defaults so you dont even need to configure them.
I think a single way to setup simplifies the way to work to library users.
Thank you for your feedback.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









