-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
110 lines (105 loc) · 3.36 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
defmodule Kjogvi.Umbrella.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
dialyzer: dialyzer(),
test_coverage: [tool: ExCoveralls],
releases: [
kjogvi: [
applications: [kjogvi_web: :permanent, opentelemetry: :temporary]
]
]
]
end
def cli do
[
preferred_envs: [
test: :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
]
]
end
# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/path repositories:
#
# {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"}
#
# Type "mix help deps" for more examples and options.
#
# Dependencies listed here are available only for this project
# and cannot be accessed from applications inside the apps/ folder.
defp deps do
[
# Required to run "mix format" on ~H/.heex files from the umbrella root
{:phoenix_live_view, "~> 1.0"},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to install project dependencies and perform other setup tasks, run:
#
# $ mix setup
#
# See the documentation for `Mix` for more info on aliases.
#
# Aliases listed here are available only for this project
# and cannot be accessed from applications inside the apps/ folder.
defp aliases do
[
# run `mix setup` in all child apps
setup: ["cmd mix setup"],
"ecto.setup": ["ecto.create --quiet", "ecto.migrate --quiet"],
lint: [
"run --no-start -e 'IO.puts(\"Checking formatting...\")'",
"format --check-formatted",
"run --no-start -e 'IO.puts(\"Checking for unused dependencies...\")'",
"deps.unlock --check-unused",
"run --no-start -e 'IO.puts(\"Running credo...\")'",
"credo --format oneline --ignore design,consistency",
"run --no-start -e 'IO.puts(\"Running dialyzer...\")'",
"dialyzer --format dialyxir --quiet"
# "run --no-start -e 'IO.puts(\"Running cycles detection...\")'",
# "xref graph --format cycles --label compile-connected --fail-above 0"
],
"lint.github": [
"run --no-start -e 'IO.puts(\"Checking formatting...\")'",
"format --check-formatted",
"run --no-start -e 'IO.puts(\"Checking for unused dependencies...\")'",
"deps.unlock --check-unused",
"run --no-start -e 'IO.puts(\"Running credo...\")'",
"credo --format oneline --ignore design,consistency",
"run --no-start -e 'IO.puts(\"Running dialyzer...\")'",
"dialyzer --format github --quiet"
# "run --no-start -e 'IO.puts(\"Running cycles detection...\")'",
# "xref graph --format cycles --label compile-connected --fail-above 0"
]
]
end
defp dialyzer do
[
plt_add_deps: :app_tree,
plt_add_apps: [:mix],
flags: [
:error_handling,
:no_opaque,
:unknown,
:no_return,
:missing_return
],
ignore_warnings: ".dialyzer_ignore.exs",
list_unused_filters: true
]
end
end