Skip to content

Commit 2279bbd

Browse files
committed
Add filtering to consider only Elixir files
1 parent 5720f63 commit 2279bbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/auto_formatter/action.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ defmodule AutoFormatter.Action do
88

99
alias AutoFormatter.{CommandRunner, HookManager}
1010

11+
@elixir_extensions [".ex", ".exs"]
12+
1113
def perform(:version) do
1214
AutoFormatter.version()
1315
end
@@ -22,6 +24,7 @@ defmodule AutoFormatter.Action do
2224
files_list =
2325
output
2426
|> String.split("\n")
27+
|> Enum.filter(&String.contains?(&1, @elixir_extensions))
2528
|> Enum.reverse()
2629
|> tl()
2730
|> Enum.reverse()

0 commit comments

Comments
 (0)