rrrene / credo-proposals

Proposals for Credo, the Elixir code analysis tool with a focus on code consistency and teaching
MIT License
9 stars 0 forks source link

dbg uses in heex templates are not reported #97

Open Munksgaard opened 10 months ago

Munksgaard commented 10 months ago

I realize this may be impossible or outside the scope of what credo can do, but I thought it would be nice to have this (lack of) behavior recorded somewhere. Feel free to close the issue if you don't feel like it applies.

Environment

Erlang/OTP 25 [erts-13.2.2.5] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Elixir 1.16.0 (compiled with Erlang/OTP 25)

What were you trying to do?

When using Phoenix, it is common to put heex templates in dedicated files, such as index.html.heex. It is possible to use dbg and other elixir functionality inside. Here's an example of the contents of a heex file:

<.link navigate={dbg("/")}>
      <.button>Go home!</.button>
</.link>

Expected outcome

Any uses of dbg are reported when running credo.

Actual outcome

Uses of dbg are not reported.

rrrene commented 10 months ago

Hi, I am moving this issue here because in the issue template section you deleted, it says that "Proposals for new features should be submitted via: https://github.com/rrrene/credo-proposals".