Skip to content

Commit b6039d3

Browse files
committed
feat: add credo and dialyxir for code linting and static type checking
- Add lint alias to run credo --strict and dialyzer - Add credo and dialyxir as dev/test dependencies - Update .gitignore to exclude dialyzer PLT files
1 parent ca48669 commit b6039d3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@ bun.lockb
1515
bun.lock
1616
.devenv/
1717
.devenv.flake.nix
18+
19+
# Dialyzer
20+
/*.plt
21+
/*.plt.hash
22+
.dialyzer_plt

mix.exs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ defmodule Phoenix.ReactServer.Mixfile do
4747
{:phoenix_html, "~> 4.1"},
4848
{:phoenix_live_view, "~> 1.0"},
4949
{:file_system, "~> 1.0"},
50-
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
50+
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
51+
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
52+
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}
5153
]
5254
end
5355

@@ -64,6 +66,8 @@ defmodule Phoenix.ReactServer.Mixfile do
6466
end
6567

6668
defp aliases do
67-
[]
69+
[
70+
lint: ["credo --strict", "dialyzer"]
71+
]
6872
end
6973
end

0 commit comments

Comments
 (0)