-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmix.exs
103 lines (95 loc) · 2.6 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
defmodule Whois.Mixfile do
use Mix.Project
@source_url "https://github.com/utkarshkukreti/whois.ex"
@spec project() :: Keyword.t()
def project do
[
app: :whois,
version: "0.3.1",
elixir: "~> 1.12",
consolidate_protocols: Mix.env() != :test,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
aliases: aliases(),
test_coverage: [
tool: ExCoveralls,
ignore_modules: [~r/Mix.Tasks.Whois/]
],
preferred_cli_env: [
check: :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test,
dialyzer: :dev
],
docs: docs(),
name: "Whois",
description: "Pure Elixir WHOIS client and parser.",
package: package(),
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
flags: [:error_handling, :unknown],
# Error out when an ignore rule is no longer useful so we can remove it
list_unused_filters: true
]
]
end
# Configuration for the OTP application
#
# Type "mix help compile.app" for more information
@spec application() :: Keyword.t()
def application do
[extra_applications: [:logger]]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# 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
defp deps do
[
{:ex_doc, "~> 0.18", only: :dev},
{:credo, "~> 1.7.0", only: [:dev, :test], runtime: false},
{:date_time_parser, "~> 1.2"},
{:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18.0", only: [:dev, :test], runtime: false},
{:patch, "~> 0.15.0", only: [:test]}
]
end
defp package do
[
maintainers: ["Utkarsh Kukreti", "Tyler Young"],
licenses: ["MIT"],
links: %{GitHub: @source_url},
files: ["lib", "mix.exs", "README.md", "CHANGELOG.md", "priv/tld.csv"]
]
end
defp aliases do
[
check: [
"clean",
"deps.unlock --check-unused",
"compile --warnings-as-errors",
"test --warnings-as-errors",
"format --check-formatted",
"deps.unlock --check-unused",
"check.dialyzer"
],
"check.dialyzer": "cmd MIX_ENV=dev mix dialyzer"
]
end
defp docs do
[
extras: ["CHANGELOG.md", "README.md"],
main: "readme",
source_url: @source_url,
formatters: ["html"]
]
end
end