Skip to content

Commit 0712854

Browse files
marcandrejosevalim
authored andcommitted
Check plugins first so they can format .ex and .exs files (#11507)
1 parent 3d3453c commit 0712854

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/mix/lib/mix/tasks/format.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,12 @@ defmodule Mix.Tasks.Format do
495495
ext = Path.extname(file)
496496

497497
cond do
498-
ext in ~w(.ex .exs) ->
499-
&elixir_format(&1, [file: file] ++ formatter_opts)
500-
501498
plugin = find_plugin_for_extension(formatter_opts, ext) ->
502499
&plugin.format(&1, [extension: ext] ++ formatter_opts)
503500

501+
ext in ~w(.ex .exs) ->
502+
&elixir_format(&1, [file: file] ++ formatter_opts)
503+
504504
true ->
505505
& &1
506506
end

0 commit comments

Comments
 (0)