-
Notifications
You must be signed in to change notification settings - Fork 325
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
Refactor warning generation #1762
Comments
Let's wait for #1564 and revisit! |
josevalim
changed the title
Proposal: Refactor warning generation
Refactor warning generation
Sep 14, 2023
We might also want to use |
👍 with moving to IO.warn! |
I've moved to IO.warn for autolinks in #1805 (comment). We can keep this issue open until we move remaining warnings we emit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've noticed we have quite a few ways of warning and the most standardized one we have is on the
Autolink
module.Perhaps for some general cases we could move this to a new helper module?
There are certain cases with a different format (no ANSI yellow on warning, no stacktrace like this):
https://github.com/elixir-lang/ex_doc/blob/6645809b2c4434221a2005b22646ad55ea2db069/lib/ex_doc/formatter/html.ex#L267C11-L267C11
I think moving this base warning logic for different cases into a specific module would help with code clarity and also make the warnings more consistent (as currently updating the mentioned piece of code to call
Autolink
just because of its warning function feels weird to me)The text was updated successfully, but these errors were encountered: