Is There A Built In IEX Command To Invoke Formatting?

Onorio Catenacci Source

I checked h and h(IEx) and didn't come up with anything.

I am sure I can shell out to a command prompt and run "mix format" but I was wondering if I'm missing something. Is there any command analogous to recompile/0 or r/1 for iex to allow me to reformat the source files in my project?



answered 8 months ago Dogbert #1

You can invoke the format mix task by calling using whatever arguments you'd pass to mix format. For example, mix format "**/*.{ex,exs}" would be:

iex(1)> ["**/*.{ex,exs}"]

comments powered by Disqus