eksperimental
unread,Dec 19, 2021, 7:36:52 AM12/19/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to elixir-lang-core
Hi all,
Since documentation is taken seriously in Elixir,
I would like to propose to emit a warning when a public function
does not a have a proper/complete function signature.
I describe an improper fucntion signature would look like this in your
IEx/ExDoc documenation:
your_function_name(arg1, arg2, options)
This is do to the fact of not using argument names in your function
definitions, for example:
def your_function_name(10, 20, options) when is_list(options),
do: ...
As of now, IEx and ExDoc do a good job as guessing these signatures,
based on the function argument names of the various function clauses
when they are not explicitely declared,
but I would like Elixir to emit a warning when it will end up looking
like `argX`.
We could introduce this feature as a flag:
--warn-on-imcomplete-signature
And eventually make it by default.
As of now, in order to avoid this, I need to execute: `mix docs` and
then grep the doc/ folder looking for `argX` with a ·
This feature will integrate well with `--warnings-as-errors` and CI to
help to maintain up a high standard in the documentation of our
libraries.
Looking forward to hearing your opinion,
- Eksperimetnal