Skip to content

Refactor warning generation #1762

Closed
Closed
@viniciusmuller

Description

@viniciusmuller

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions