Skip to content

Commit 2bc76b5

Browse files
Merge pull request #31 from renatomassaro/sort-schema-list
Sort generated schema list
2 parents 0d0d604 + e39b981 commit 2bc76b5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/mix/task/feeb_db/list_schemas.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ defmodule Mix.Tasks.FeebDb.ListSchemas do
4343
modules =
4444
@table
4545
|> :ets.tab2list()
46+
|> Enum.sort()
4647
|> Enum.reduce(%{}, fn {ctx, mod}, acc ->
4748
ctx_mods = Map.get(acc, ctx, [])
48-
Map.put(acc, ctx, [to_string(mod) | ctx_mods])
49+
Map.put(acc, ctx, [to_string(mod) | ctx_mods] |> Enum.sort())
4950
end)
5051

5152
File.write!(@default_target, :json.encode(modules))

0 commit comments

Comments
 (0)