Skip to content

Commit

Permalink
Apply config sorting to rel/overlay/.*.exs
Browse files Browse the repository at this point in the history
  • Loading branch information
novaugust committed Apr 5, 2024
1 parent a169995 commit ffa199a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
### Breaking Changes

* drop support for elixir `1.14`
* sorting configs for the first time can change your configuration; see `Styler.Style.Configs` moduledoc for more

## v0.11.9

Expand Down
2 changes: 1 addition & 1 deletion lib/style/configs.ex
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ defmodule Styler.Style.Configs do
end

def run(zipper, %{file: file} = ctx) do
if file =~ ~r|config/.*\.exs| do
if file =~ ~r|config/.*\.exs| or file =~ ~r|rel/overlay/.*\.exs| do
{:cont, zipper, Map.put(ctx, :config?, true)}
else
{:halt, zipper, ctx}
Expand Down
1 change: 1 addition & 0 deletions test/style/configs_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule Styler.Style.ConfigsTest do
# :config? is private api, so don't be surprised if this has to change at some point
assert {:cont, _, %{config?: true}} = Configs.run(zipper, %{file: "apps/foo/config/#{file}"})
assert {:cont, _, %{config?: true}} = Configs.run(zipper, %{file: "config/#{file}"})
assert {:cont, _, %{config?: true}} = Configs.run(zipper, %{file: "rel/overlay/#{file}"})
assert {:halt, _, _} = Configs.run(zipper, %{file: file})
end
end
Expand Down

0 comments on commit ffa199a

Please sign in to comment.