-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
111 lines (100 loc) · 2.89 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
111
defmodule RedactEx.MixProject do
use Mix.Project
@source_url "https://github.com/primait/redact_ex"
@version "0.1.6-rc.0"
def project do
[
app: :redact_ex,
version: @version,
source_url: @source_url,
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),
aliases: aliases(),
description: description(),
deps: deps(),
dialyzer: [
plt_add_apps: [:mix, :ex_unit],
list_unused_filters: true
],
consolidate_protocols: Mix.env() != :test,
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
# Docs
name: "RedactEx",
source_url: @source_url,
homepage_url: @source_url,
docs: docs(),
package: package()
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[] ++ dev_deps()
end
defp dev_deps do
[
{:credo, "~> 1.6", only: [:dev, :test]},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.10", only: :test},
{:ex_doc, "~> 0.27", only: :dev, 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.
defp aliases do
ci_aliases() ++ check_aliases()
end
defp ci_aliases do
[
"ci.compile": ["compile.check"],
"ci.credo": ["credo -a --strict"],
"ci.deps": ["deps.unlock --check-unused"],
"ci.dialyzer": ["dialyzer"],
"ci.format": ["format.check"],
"ci.test": ["test"]
]
end
defp check_aliases do
[
"compile.check": [
"compile --all-warnings --ignore-module-conflict --warnings-as-errors --debug-info"
],
"format.check": [
"format --check-formatted mix.exs \"lib/**/*.{ex,exs}\" \"test/**/*.{ex,exs}\" \"priv/**/*.{ex,exs}\" \"config/**/*.{ex,exs}\""
],
"format.all": [
"format mix.exs \"lib/**/*.{ex,exs}\" \"test/**/*.{ex,exs}\" \"priv/**/*.{ex,exs}\" \"config/**/*.{ex,exs}\""
]
]
end
defp docs,
do: [
# The main page in the docs
main: "RedactEx",
# logo: "path/to/logo.png",
extras: ["README.md"]
]
defp package,
do: [
name: "redact_ex",
maintainers: ["Luca Dei Zotti"],
licenses: ["MIT"],
links: %{"Github" => "https://github.com/primait/redact_ex"}
]
defp description, do: "Utilities and best practices to redact potentially sensitive data"
end