- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.5k
Description
Elixir and Erlang/OTP versions
Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1]
Elixir 1.13.4 (compiled with Erlang/OTP 23)
Operating system
Github Actions CI
Current behavior
We recently had an issue where we had configured the HTMLFormatter as a plugin in .formatter.exs and it was failing silently in CI.
There are two underlying issues here:
- 
When a plugin defined in .formatter.exsis not found,mix formatoutputsSkipping formatter plugin Phoenix.LiveView.HTMLFormatter because module cannot be foundbut does not return an error code. This is a problem in CI where the output isn't generally reviewed, only error returns.
- 
mix formatdoes not compile the application being formatted or its dependencies. This was ok before plugins, but when a plugin is involved, especially if that plugin is not yet compiled, this is a problem.
The combination of these two potentially leaves users in the state of having a Github Actions CI job that performs a checkout and then a mix format, which runs without compiling, and then "silently" failed to use the desired plugin.
Expected behavior
- mix formatshould fail if a plugin is not found
- mix formatshould compile the app when a plugin is defined in- .formatter.exs(maybe only when it is not found?)