From cadc84201007250997dc8bcad5d38ff9f2a155a7 Mon Sep 17 00:00:00 2001 From: Owen Date: Sun, 1 Nov 2026 21:40:29 +0100 Subject: [PATCH] update docs with static analysis tools --- AGENTS.md | 3 +++ CODING_STANDARDS.md | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 817fa3c..8de84a2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,6 +50,9 @@ Read `CODING_STANDARDS.md` before writing code. Read the section for the layer y Run `mix precommit` and fix what it flags. +Type-check risky changes with `mix dialyzer` (not part of `mix precommit`; the +first run builds a PLT and is slow). + ## Agent skills ### Issue tracker diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md index b1f1349..935e5bb 100644 --- a/CODING_STANDARDS.md +++ b/CODING_STANDARDS.md @@ -116,3 +116,17 @@ How to write code in this repo. Read the section for the layer you're touching. ## Precommit `mix precommit` runs `compile --warnings-as-errors`, `deps.unlock --unused`, `format` and `test`. + +## Type checking (Dialyzer) + +`dialyxir` is available in dev/test; run: + + mix dialyzer + +It is intentionally **not** part of `mix precommit`: the first run builds a PLT +(several minutes), though subsequent runs are fast. The PLT lives under +`_build/` (gitignored). + +Treat warnings as bugs — add `@spec`s or fix them. Only suppress with +`@dialyzer` or `.dialyzer_ignore.exs` when accompanied by a comment explaining +why.