-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmix.exs
More file actions
97 lines (86 loc) · 2.42 KB
/
mix.exs
File metadata and controls
97 lines (86 loc) · 2.42 KB
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
defmodule ExUnitJSON.MixProject do
use Mix.Project
@version ".version" |> File.read!() |> String.trim()
@source_url "https://github.com/ZenHive/ex_unit_json"
def project do
[
app: :ex_unit_json,
version: @version,
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
description: description(),
package: package(),
docs: docs(),
dialyzer: dialyzer(),
test_coverage: test_coverage()
]
end
def application do
[
# :tools provides :cover module for coverage analysis
extra_applications: [:logger, :tools]
]
end
def cli do
[
preferred_envs: ["test.json": :test, "dialyzer.json": :dev]
]
end
defp deps do
[
# Dev/Test (pinned to current latest)
{:ex_doc, "~> 0.40.3", only: :dev, runtime: false},
{:credo, "~> 1.7.18", only: [:dev, :test], runtime: false},
{:sobelow, "~> 0.14.1", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4.7", only: [:dev, :test], runtime: false},
{:dialyzer_json, "~> 0.2.0", only: [:dev, :test], runtime: false},
{:tidewave, "~> 0.5.6", only: :dev},
{:bandit, "~> 1.11.1", only: :dev},
{:styler, "~> 1.11.0", only: [:dev, :test], runtime: false},
{:doctor, "~> 0.23.0", only: :dev, runtime: false}
]
end
defp aliases do
[
tidewave: [
"run --no-halt -e 'Agent.start(fn -> Bandit.start_link(plug: Tidewave, port: 4004) end)'"
]
]
end
defp description do
"""
AI-friendly JSON test output for ExUnit.
Provides structured JSON output from mix test for use with AI editors like Claude Code.
"""
end
defp package do
[
licenses: ["MIT"],
links: %{"GitHub" => @source_url},
files: ~w(lib .formatter.exs .version mix.exs README.md CHANGELOG.md LICENSE AGENTS.md)
]
end
defp docs do
[
main: "readme",
extras: ["README.md", "AGENTS.md"],
source_url: @source_url
]
end
defp dialyzer do
[
# Include :mix and :ex_unit in PLT for Mix.Task and ExUnit functions
plt_add_apps: [:mix, :ex_unit]
]
end
defp test_coverage do
[
# These modules are tested via integration tests that run in subprocesses
# (System.cmd), so coverage tracking doesn't see their execution.
ignore_modules: [Mix.Tasks.Test.Json, ExUnitJSON.Coverage],
threshold: 90
]
end
end