I only see the errors in the file that has the errors (red squiggles on the lines and I can get details at the bottom optionally), along with a red dot at the bottom that says the project has errors somewhere (which I can click on for details). What do you mean by linear fashion? Compiling is very very linear as it is, extremely linear.
Everyone should really be using credo already, heck even many root Elixir libraries itself use credo. ^.^
In Elixir everything is a function, defs are function, macro’s are functions, defmodules are functions, everything is functions. So to quote it straight out is not ‘pretty’, though perfectly correct:
iex> quote do
...> defmodule Blah do
...> def bloop, do: 42
...> def bleep(a, b) do
...> c = a*b
...> c + a
...> end
...> end
...> end |> Macro.to_string() |> IO.puts()
defmodule(Blah) do
def(bloop) do
42
end
def(bleep(a, b)) do
c = a * b
c + a
end
end
:ok
See how even def is just a function call to a function named def (macro, well, special form) that takes a first argument of, say, bloop and a second argument of, say, [do: 42]? So just printing it out does not always work. Even if you special-case things in your custom formatter like def and defp and others you will miss all the other defblah’s that libraries add, they may not even start with def. The lack of knowing the types of everything makes formatting a really really really hard problem. Formatting becomes almost trivial when you know the types of everything in the AST in comparison.






















