Skip to content
dialyzer-integration logo

Dialyzer Integration

dialyzer-integration

Use when integrating Dialyzer into development workflows and CI/CD pipelines for Erlang/Elixir projects.

SKILL.md

Full skill instructions

Dialyzer Integration

Integrating Dialyzer into development workflow and CI/​CD pipelines.

Local Development

Initial Setup

# Install dialyxir
mix deps.get

# Build initial PLT (takes time first run)
mix dialyzer --plt

# Run analysis
mix dialyzer

Incremental Analysis

# Only analyze changed files
mix dialyzer --incremental

# Force rebuild PLT
mix dialyzer --clean

CI/​CD Integration

GitHub Actions

name: Dialyzer

on: [push, pull_request]

jobs:
  dialyzer:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/​checkout@v3

      - name: Set up Elixir
        uses: erlef/​setup-beam@v1
        with:
          elixir-version: '1.15'
          otp-version: '26'

      - name: Restore dependencies cache
        uses: actions/​cache@v3
        with:
          path: deps
          key: ${{ runner.os }}-mix-${{ hashFiles('**/​mix.lock') }}

      - name: Restore PLT cache
        uses: actions/​cache@v3
        id: plt-cache
        with:
          path: priv/​plts
          key: ${{ runner.os }}-plt-${{ hashFiles('**/​mix.lock') }}

      - name: Install dependencies
        run: mix deps.get

      - name: Create PLTs
        if: steps.plt-cache.outputs.cache-hit != 'true'
        run: mix dialyzer --plt

      - name: Run Dialyzer
        run: mix dialyzer --format github

GitLab CI

dialyzer:
  stage: test
  script:
    - mix local.hex --force
    - mix local.rebar --force
    - mix deps.get
    - mix dialyzer
  cache:
    paths:
      - _build/
      - deps/
      - priv/​plts/

IDE Integration

VS Code (ElixirLS)

{
  "elixirLS.dialyzerEnabled": true,
  "elixirLS.dialyzerFormat": "dialyxir_long",
  "elixirLS.dialyzerWarnOpts": [
    "error_handling",
    "underspecs",
    "unmatched_returns"
  ]
}

Vim/​Neovim (coc-elixir)

{
  "elixir.dialyzer.enabled": true
}

Pre-commit Hooks

Using Husky/​Lefthook

# lefthook.yml
pre-commit:
  commands:
    dialyzer:
      glob: "*.ex"
      run: mix dialyzer --incremental

Git Hook Script

#!/​bin/​sh
# .git/​hooks/​pre-commit

echo "Running Dialyzer..."
mix dialyzer --incremental --quiet

if [ $? -ne 0 ]; then
  echo "Dialyzer found issues. Commit aborted."
  exit 1
fi

Team Workflow

Shared PLT Strategy

# mix.exs
def project do
  [
    dialyzer: [
      plt_core_path: "priv/​plts",
      plt_local_path: "priv/​plts",
      plt_add_apps: [:mix, :ex_unit],
      # Shared across team via git
      plt_file: {:no_warn, "priv/​plts/​project.plt"}
    ]
  ]
end

Baseline Approach

# Generate baseline
mix dialyzer > dialyzer_baseline.txt

# Check for new warnings
mix dialyzer | diff - dialyzer_baseline.txt

Performance Optimization

Parallel Analysis

def project do
  [
    dialyzer: [
      flags: [:error_handling],
      # Use multiple cores
      plt_add_deps: :app_tree
    ]
  ]
end

Selective Analysis

# Only check specific paths
mix dialyzer lib/​critical/ test/​important_test.exs

Incremental Mode

# Much faster after initial run
mix dialyzer --incremental

Monitoring and Reporting

Custom Formatter

# lib/​custom_dialyzer_formatter.ex
defmodule CustomDialyzerFormatter do
  def format(warnings) do
    warnings
    |> Enum.map(&format_warning/​1)
    |> Enum.join("\n")
  end

  defp format_warning(warning) do
    # Custom formatting logic
  end
end

Metrics Collection

# Count warnings over time
mix dialyzer | grep -c "warning:" >> dialyzer_metrics.log

Troubleshooting

PLT Issues

# Remove and rebuild
rm -rf _build/​dev/​*.plt priv/​plts/​*.plt
mix dialyzer --plt

Memory Issues

# Increase VM memory
elixir --erl "+hms 4096" -S mix dialyzer

Slow Analysis

# Use incremental mode
mix dialyzer --incremental

# Or analyze subset
mix dialyzer lib/​core/

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View