Skip to content

Commit fefc479

Browse files
committed
Add bin/audit calling Dialyzer & Credo
1 parent ea32fdb commit fefc479

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

bin/audit

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
# This script is used to perform an audit of the Elixir project.
4+
# It checks for formatting issues, static code analysis, and code style consistency.
5+
#
6+
# Usage:
7+
# ./bin/audit # Run to audit your project.
8+
9+
echo "Checking code formatting..."
10+
bin/format --check
11+
12+
echo "Running static code analysis with dialyzer..."
13+
mix dialyzer
14+
15+
echo "Checking code style with Credo..."
16+
mix credo --strict

mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ defmodule ElixirScript.MixProject do
77
version: "0.0.0",
88
elixir: "~> 1.15",
99
escript: escript(),
10-
deps: deps()
10+
deps: deps(),
11+
dialyzer: [plt_add_apps: [:mix]]
1112
]
1213
end
1314

0 commit comments

Comments
 (0)