-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
85 lines (81 loc) · 2.3 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
defmodule BattleShip.MixProject do
use Mix.Project
def project do
[
app: :battle_ship,
version: "0.1.0",
elixir: "~> 1.15",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
preferred_cli_env: [
ci: :test,
"ci.test": :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.detail": :test,
credo: :test,
dialyzer: :test,
sobelow: :test
],
test_coverage: [tool: ExCoveralls],
dialyzer: [plt_add_apps: [:ex_unit, :mix], ignore_warnings: ".dialyzer_ignore.exs"]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
mod: {BattleShip.Application, []}
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18", only: :test},
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:styler, "~> 1.0.0-rc.0", only: [:dev, :test], runtime: false},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.31", only: :dev, runtime: false}
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
]
end
defp aliases do
[
ci: [
"deps.unlock --check-unused",
"deps.audit",
"hex.audit",
"sobelow --config .sobelow-conf",
"format --check-formatted",
"cmd npx prettier -c .",
"compile --force --warnings-as-errors",
"credo --strict",
"dialyzer",
"cover.full"
],
"cover.full": [
"coveralls"
],
"cover.full_html": [
"coveralls.html"
],
prettier: ["cmd npx prettier -w ."],
"ci.deps_and_security": ["sobelow --config .sobelow-config"],
"ci.code_quality": [
"compile --force --warnings-as-errors",
"credo --strict",
"dialyzer"
],
"ci.test": [
"test --cover --warnings-as-errors"
]
]
end
end