8000 Fix module Exploration by pxp9 · Pull Request #10 · pxp9/lazy_doc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix module Exploration #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ provider which is a tuple of two elements `{GithubAi, :codestral}`.
- Custom paramters to pass the model (max\_tokens, top\_p, temperature).
- Run mix format after writing the files, just in case.
- Improve the default prompt to generate markdown syntax.
- BUG? To discuss this behavior, functions with same name but different arity , generates docs and the docs are inserted in the first clause (probably it is due to the filtering after fetching the docs).
- Make a task or an arg in the current task to check if the functions are
documented. (allows CI usage)

## Installation

Expand Down Expand Up @@ -61,3 +62,43 @@ mix lazy_doc
```

I would recommend to run a `mix format` after just in case.

## Known limitations that wont be fixed.

### Module names in the same file must be different.
If the user creates an inner module with the same name as the parent module
`lazy_doc`, it wont work properly because they have the same `:__aliases__` AST
node.

> Note: this limitation it is only in module names. So if the user have same
> names of functions in different modules or in the same module, it will work.

``` elixir

defmodule Hello do

defmodule Hello do

end

end
```

produces the following AST

``` elixir
{:defmodule, [line: 1],
[
## This is why it does not work [:Hello]
{:__aliases__, [line: 1], [:Hello]},
[
do: {:defmodule, [line: 3],
[
{:__aliases__, [line: 3],
## This is why it does not work [:Hello]
[:Hello]},
[do: {:__block__, [], []}]
]}
]
]}
```
4 changes: 1 addition & 3 deletions config/runtime.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Config

if Mix.env() == :dev do
Dotenv.load!()
end
Dotenv.load!()

config :lazy_doc, :token, System.get_env("API_TOKEN")
Loading
0