Assay.Watch (assay v0.6.0)

Copy Markdown View Source

File watching and incremental Dialyzer re-execution.

This module watches project files and re-runs Dialyzer when changes are detected. Used by mix assay.watch for continuous feedback during development.

Features

  • Watches common project directories (lib, apps, config, test)
  • Debounces file changes to avoid excessive runs
  • Cancels in-flight analysis tasks when new changes are detected
  • Automatically ignores build artifacts (_build/, deps/, .git/)

Options

  • :project_root - Root directory to watch (defaults to current working directory)
  • :debounce - Debounce delay in milliseconds (default: 300)
  • :latency - File system watcher latency (default: 500)
  • :run_once - Run once and exit instead of watching continuously

Summary

Functions

Runs incremental Dialyzer once and then re-runs it whenever watched files change. Intended for local developer use (mix assay.watch).

Functions

run(opts \\ [])

@spec run(keyword()) :: :ok | no_return()

Runs incremental Dialyzer once and then re-runs it whenever watched files change. Intended for local developer use (mix assay.watch).

Returns :ok when run_once: true, otherwise never returns (runs indefinitely).