Skip to content

Commit

Permalink
mix style: only read .ex and .exs files
Browse files Browse the repository at this point in the history
  • Loading branch information
novaugust committed May 7, 2023
1 parent 4893f4d commit e9510ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/mix/tasks/style.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ defmodule Mix.Tasks.Style do

files
|> Stream.flat_map(fn
"-" -> [:stdin]
path -> path |> Path.expand() |> Path.wildcard(match_dot: true)
"-" ->
[:stdin]

path ->
path |> Path.expand() |> Path.wildcard(match_dot: true) |> Enum.filter(&String.ends_with?(&1, [".ex", "exs"]))
end)
|> Task.async_stream(&style_file(&1, formatter_opts, check_styled?),
ordered: false,
Expand Down

0 comments on commit e9510ed

Please sign in to comment.