-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Elixir and Erlang/OTP versions
Erlang/OTP 25 [erts-13.2.2.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Elixir 1.15.4 (compiled with Erlang/OTP 25)
Operating system
macOS, linux
Current behavior
Repro:
- git clone git@github.com:lukaszsamson/elixir_bug_formatter_plugin.git
- cd elixir_bug_formatter_plugin
- mix deps.get
- mix format --check-formatted
** (Mix) mix format failed due to --check-formatted.
The following files are not formatted:
/dir/elixir_bug_formatter_plugin/apps/backoffice/lib/backoffice/templates/some/index.html.heex
- mix clean
- mix format --check-formatted
no error - cd apps/backoffice
- mix format --check-formatted
** (Mix) mix format failed due to --check-formatted.
The following files are not formatted:
/dir/elixir_bug_formatter_plugin/apps/backoffice/lib/backoffice/templates/some/index.html.heex
It works consistently if I add
plugins: [Phoenix.LiveView.HTMLFormatter],
to root .formatter.exs
Expected behavior
https://hexdocs.pm/mix/main/Mix.Tasks.Format.html#module-formatting-options state about subdirectories:
Configuration between .formatter.exs are not shared nor inherited.
Nothing about interaction between subdirectories and plugins is stated in plugins section.
My expectation is that running formatter in a subdirectory should be equivalent with running it in root. Moreover, it should behave consistently and not depend on wether mix clean has been run.
Metadata
Metadata
Assignees
Labels
No labels