Claude-skill-registry dialyzer-configuration
Use when configuring Dialyzer for Erlang/Elixir type checking and static analysis.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/dialyzer-configuration" ~/.claude/skills/majiayu000-claude-skill-registry-dialyzer-configuration && rm -rf "$T"
manifest:
skills/data/dialyzer-configuration/SKILL.mdsource content
Dialyzer Configuration
Dialyzer is a static analysis tool for Erlang and Elixir that identifies software discrepancies such as type errors, unreachable code, and unnecessary tests.
Configuration Files
dialyzer.ignore-warnings
# Ignore specific warnings lib/my_module.ex:42:pattern_match_cov
.dialyzer_ignore.exs
[ {"lib/generated_code.ex", :no_return}, {~r/lib\/legacy\/.*/, :unknown_function} ]
mix.exs Configuration
def project do [ app: :my_app, dialyzer: [ plt_add_apps: [:mix, :ex_unit], plt_core_path: "priv/plts", plt_file: {:no_warn, "priv/plts/dialyzer.plt"}, flags: [:error_handling, :underspecs, :unmatched_returns], ignore_warnings: ".dialyzer_ignore.exs", list_unused_filters: true ] ] end
Common Configuration Options
PLT Management
: Additional applications to include in PLTplt_add_apps
: Directory for core PLT filesplt_core_path
: Custom PLT file locationplt_file
: Include dependencies (plt_add_deps
,:app_tree
,:apps_direct
):transitive
Analysis Flags
- Check error handling:error_handling
- Warn on under-specified functions:underspecs
- Warn on unmatched return values:unmatched_returns
- Warn on unknown functions/types:unknown
- Warn on over-specified functions:overspecs
Filter Options
: File with warning patterns to ignoreignore_warnings
: Show unused ignore patternslist_unused_filters
Best Practices
- Incremental PLT Building: Use project-specific PLTs to speed up analysis
- Gradual Adoption: Start with subset of checks, expand over time
- CI Integration: Run Dialyzer in continuous integration
- Type Specs: Add comprehensive @spec annotations
- Warning Management: Document intentional ignores
Common Patterns
Conditional Analysis
if Mix.env() in [:dev, :test] do {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false} end
Custom Check Script
#!/bin/bash mix dialyzer --format github
GitHub Actions Integration
- name: Run Dialyzer run: mix dialyzer --format github